Browse Source
Merge pull request #152 from EasyAbp/use-list
Use List<T> instead of ICollection<T>
pull/155/head
Super
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
13 additions and
13 deletions
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Categories/Dtos/CategoryDto.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductAttributeDto.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductDto.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductAttributeEto.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductEto.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/CreateModal.cshtml.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/Product/EditModal.cshtml.cs
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/Pages/EShop/Products/Products/ProductSku/CreateModal.cshtml.cs
|
|
|
@ -19,7 +19,7 @@ namespace EasyAbp.EShop.Products.Categories.Dtos |
|
|
|
|
|
|
|
public Guid? ParentId { get; set; } |
|
|
|
|
|
|
|
public ICollection<CategoryDto> Children { get; set; } |
|
|
|
public List<CategoryDto> Children { get; set; } |
|
|
|
|
|
|
|
public string Description { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
@ -15,6 +15,6 @@ namespace EasyAbp.EShop.Products.Products.Dtos |
|
|
|
|
|
|
|
public int DisplayOrder { get; set; } |
|
|
|
|
|
|
|
public ICollection<ProductAttributeOptionDto> ProductAttributeOptions { get; set; } |
|
|
|
public List<ProductAttributeOptionDto> ProductAttributeOptions { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
@ -40,9 +40,9 @@ namespace EasyAbp.EShop.Products.Products.Dtos |
|
|
|
|
|
|
|
public decimal? MaximumPrice { get; set; } |
|
|
|
|
|
|
|
public ICollection<ProductAttributeDto> ProductAttributes { get; set; } |
|
|
|
public List<ProductAttributeDto> ProductAttributes { get; set; } |
|
|
|
|
|
|
|
public ICollection<ProductSkuDto> ProductSkus { get; set; } |
|
|
|
public List<ProductSkuDto> ProductSkus { get; set; } |
|
|
|
|
|
|
|
public ProductSkuDto GetSkuById(Guid skuId) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -15,6 +15,6 @@ namespace EasyAbp.EShop.Products.Products |
|
|
|
|
|
|
|
public int DisplayOrder { get; set; } |
|
|
|
|
|
|
|
public ICollection<ProductAttributeOptionEto> ProductAttributeOptions { get; set; } |
|
|
|
public List<ProductAttributeOptionEto> ProductAttributeOptions { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
@ -34,8 +34,8 @@ namespace EasyAbp.EShop.Products.Products |
|
|
|
|
|
|
|
public bool IsHidden { get; set; } |
|
|
|
|
|
|
|
public ICollection<ProductAttributeEto> ProductAttributes { get; set; } |
|
|
|
public List<ProductAttributeEto> ProductAttributes { get; set; } |
|
|
|
|
|
|
|
public ICollection<ProductSkuEto> ProductSkus { get; set; } |
|
|
|
public List<ProductSkuEto> ProductSkus { get; set; } |
|
|
|
} |
|
|
|
} |
|
|
|
@ -21,9 +21,9 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product |
|
|
|
[BindProperty] |
|
|
|
public CreateEditProductViewModel Product { get; set; } |
|
|
|
|
|
|
|
public ICollection<SelectListItem> ProductGroups { get; set; } |
|
|
|
public List<SelectListItem> ProductGroups { get; set; } |
|
|
|
|
|
|
|
public ICollection<SelectListItem> Categories { get; set; } |
|
|
|
public List<SelectListItem> Categories { get; set; } |
|
|
|
|
|
|
|
private readonly ICategoryAppService _categoryAppService; |
|
|
|
private readonly IProductDetailAppService _productDetailAppService; |
|
|
|
|
|
|
|
@ -26,9 +26,9 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.Product |
|
|
|
[BindProperty] |
|
|
|
public CreateEditProductViewModel Product { get; set; } |
|
|
|
|
|
|
|
public ICollection<SelectListItem> ProductGroups { get; set; } |
|
|
|
public List<SelectListItem> ProductGroups { get; set; } |
|
|
|
|
|
|
|
public ICollection<SelectListItem> Categories { get; set; } |
|
|
|
public List<SelectListItem> Categories { get; set; } |
|
|
|
|
|
|
|
private readonly ICategoryAppService _categoryAppService; |
|
|
|
private readonly IProductDetailAppService _productDetailAppService; |
|
|
|
|
|
|
|
@ -26,7 +26,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku |
|
|
|
[BindProperty] |
|
|
|
public Dictionary<string, Guid> SelectedAttributeOptionIdDict { get; set; } |
|
|
|
|
|
|
|
public Dictionary<string, ICollection<SelectListItem>> Attributes { get; set; } |
|
|
|
public Dictionary<string, List<SelectListItem>> Attributes { get; set; } |
|
|
|
|
|
|
|
private readonly IProductInventoryAppService _productInventoryAppService; |
|
|
|
private readonly IProductDetailAppService _productDetailAppService; |
|
|
|
@ -46,7 +46,7 @@ namespace EasyAbp.EShop.Products.Web.Pages.EShop.Products.Products.ProductSku |
|
|
|
{ |
|
|
|
var product = await _productAppService.GetAsync(ProductId); |
|
|
|
|
|
|
|
Attributes = new Dictionary<string, ICollection<SelectListItem>>(); |
|
|
|
Attributes = new Dictionary<string, List<SelectListItem>>(); |
|
|
|
|
|
|
|
foreach (var attribute in product.ProductAttributes.ToList()) |
|
|
|
{ |
|
|
|
|