Refactoring and Adding Tests (#28)
* Introducing repository and refactoring services. Changing entities to use int keys everywhere. * Refactoring application services to live in web project and only reference repositories, not EF contexts. * Cleaning up implementations * Moving logic out of CatalogController Moving entity knowledge out of viewmodels. * Implementing specification includes better for catalogservice * Cleaning up and adding specification unit tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Catalog";
|
||||
@model Microsoft.eShopWeb.ViewModels.CatalogIndex
|
||||
@model CatalogIndexViewModel
|
||||
}
|
||||
<section class="esh-catalog-hero">
|
||||
<div class="container">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model Microsoft.eShopWeb.ViewModels.PaginationInfo
|
||||
@model PaginationInfoViewModel
|
||||
|
||||
<div class="esh-pager">
|
||||
<div class="container">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model Microsoft.eShopWeb.ApplicationCore.Entities.CatalogItem
|
||||
@model CatalogItemViewModel
|
||||
|
||||
|
||||
<form asp-controller="Cart" asp-action="AddToCart">
|
||||
@@ -12,11 +12,11 @@
|
||||
<div class="esh-catalog-price">
|
||||
<span>@Model.Price.ToString("N2")</span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="@Model.CatalogBrand" name="brand" />
|
||||
@*<input type="hidden" asp-for="@Model.CatalogBrand" name="brand" />
|
||||
<input type="hidden" asp-for="@Model.CatalogBrandId" name="brandId" />
|
||||
<input type="hidden" asp-for="@Model.CatalogType" name="type" />
|
||||
<input type="hidden" asp-for="@Model.CatalogTypeId" name="typeId" />
|
||||
<input type="hidden" asp-for="@Model.Description" name="description" />
|
||||
<input type="hidden" asp-for="@Model.Description" name="description" />*@
|
||||
<input type="hidden" asp-for="@Model.Id" name="id" />
|
||||
<input type="hidden" asp-for="@Model.Name" name="name" />
|
||||
<input type="hidden" asp-for="@Model.PictureUri" name="pictureUri" />
|
||||
|
||||
Reference in New Issue
Block a user