Consolidate Web and WebRazorPages Projects (#192)

* Moved Privacy, Home page to Razor Pages

* Migrating Basket from RazorPages to Web.

* Removed BasketController; refactored viewmodels

* Moved BasketComponent into Pages/Shared
Added auth rules to Startup for Pages
Added notes to controllers about Pages usage.

* Fixed broken my orders test
Consolidated Functional Tests

* Fixed logo link to home page
Fixed Order Detail Total $ format
This commit is contained in:
Steve Smith
2019-01-18 13:29:00 -05:00
committed by GitHub
parent 483340f21e
commit 99c416142f
42 changed files with 430 additions and 431 deletions

View File

@@ -1,13 +0,0 @@
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class BasketItemViewModel
{
public int Id { get; set; }
public int CatalogItemId { get; set; }
public string ProductName { get; set; }
public decimal UnitPrice { get; set; }
public decimal OldUnitPrice { get; set; }
public int Quantity { get; set; }
public string PictureUrl { get; set; }
}
}

View File

@@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.eShopWeb.Web.ViewModels
{
public class BasketViewModel
{
public int Id { get; set; }
public List<BasketItemViewModel> Items { get; set; } = new List<BasketItemViewModel>();
public string BuyerId { get; set; }
public decimal Total()
{
return Math.Round(Items.Sum(x => x.UnitPrice * x.Quantity), 2);
}
}
}