adding initial project and solution files
This commit is contained in:
13
src/Web/ViewModels/Catalog.cs
Normal file
13
src/Web/ViewModels/Catalog.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Microsoft.eShopWeb.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.eShopWeb.ViewModels
|
||||
{
|
||||
public class Catalog
|
||||
{
|
||||
public int PageIndex { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int Count { get; set; }
|
||||
public List<CatalogItem> Data { get; set; }
|
||||
}
|
||||
}
|
||||
16
src/Web/ViewModels/CatalogIndex.cs
Normal file
16
src/Web/ViewModels/CatalogIndex.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Microsoft.eShopWeb.Models;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.eShopWeb.ViewModels
|
||||
{
|
||||
public class CatalogIndex
|
||||
{
|
||||
public IEnumerable<CatalogItem> CatalogItems { get; set; }
|
||||
public IEnumerable<SelectListItem> Brands { get; set; }
|
||||
public IEnumerable<SelectListItem> Types { get; set; }
|
||||
public int? BrandFilterApplied { get; set; }
|
||||
public int? TypesFilterApplied { get; set; }
|
||||
public PaginationInfo PaginationInfo { get; set; }
|
||||
}
|
||||
}
|
||||
17
src/Web/ViewModels/PaginationInfo.cs
Normal file
17
src/Web/ViewModels/PaginationInfo.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.eShopWeb.ViewModels
|
||||
{
|
||||
public class PaginationInfo
|
||||
{
|
||||
public int TotalItems { get; set; }
|
||||
public int ItemsPerPage { get; set; }
|
||||
public int ActualPage { get; set; }
|
||||
public int TotalPages { get; set; }
|
||||
public string Previous { get; set; }
|
||||
public string Next { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user