Fix in monolithic part for issue #67 https://github.com/dotnet/eShopOnContainers/issues/67 ViewModels folder
This commit is contained in:
parent
76be6dbb1e
commit
fb2da83805
@ -1,15 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using eShopWeb.Models.CatalogViewModels;
|
||||
using eShopWeb.Models;
|
||||
using eShopWeb.Models.Pagination;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using eShopWeb.Services;
|
||||
using eShopWeb.ViewModels;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.IO;
|
||||
using eShopWeb.Services;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
|
||||
@ -33,7 +28,7 @@ namespace eShopWeb.Controllers
|
||||
var itemsPage = 10;
|
||||
var catalog = await _catalogSvc.GetCatalogItems(page ?? 0, itemsPage, BrandFilterApplied, TypesFilterApplied);
|
||||
|
||||
var vm = new IndexViewModel()
|
||||
var vm = new CatalogIndex()
|
||||
{
|
||||
CatalogItems = catalog.Data,
|
||||
Brands = await _catalogSvc.GetBrands(),
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using eShopWeb.Models;
|
||||
@ -7,7 +6,7 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using eShopWeb.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using eShopWeb.ViewModels;
|
||||
|
||||
namespace eShopWeb.Services
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
using eShopWeb.Models;
|
||||
using eShopWeb.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopWeb.Services
|
||||
|
@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using eShopWeb.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopWeb.Models
|
||||
namespace eShopWeb.ViewModels
|
||||
{
|
||||
public class Catalog
|
||||
{
|
@ -1,13 +1,10 @@
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using eShopWeb.Models.Pagination;
|
||||
using System;
|
||||
using eShopWeb.Models;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopWeb.Models.CatalogViewModels
|
||||
namespace eShopWeb.ViewModels
|
||||
{
|
||||
public class IndexViewModel
|
||||
public class CatalogIndex
|
||||
{
|
||||
public IEnumerable<CatalogItem> CatalogItems { get; set; }
|
||||
public IEnumerable<SelectListItem> Brands { get; set; }
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace eShopWeb.Models.Pagination
|
||||
namespace eShopWeb.ViewModels
|
||||
{
|
||||
public class PaginationInfo
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Catalog";
|
||||
@model eShopWeb.Models.CatalogViewModels.IndexViewModel
|
||||
@model eShopWeb.ViewModels.CatalogIndex
|
||||
}
|
||||
<section class="esh-catalog-hero">
|
||||
<div class="container">
|
||||
|
@ -1,4 +1,4 @@
|
||||
@model eShopWeb.Models.Pagination.PaginationInfo
|
||||
@model eShopWeb.ViewModels.PaginationInfo
|
||||
|
||||
<div class="esh-pager">
|
||||
<div class="container">
|
||||
|
Loading…
x
Reference in New Issue
Block a user