Feature load improvement (#374)

* use lambda expression  => improve database call

* use lambda instead  for each replace call to repository to reduce call to database

* improve readability and maintainability, and add order by

* clean semicolon

* fix use correct catalog item id
This commit is contained in:
Cédric Michel
2020-05-13 19:45:52 +02:00
committed by GitHub
parent 2d08fa4090
commit 92ca22cf8b
4 changed files with 69 additions and 46 deletions

View File

@@ -0,0 +1,14 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System;
using System.Linq;
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
{
public class CatalogItemsSpecification : BaseSpecification<CatalogItem>
{
public CatalogItemsSpecification(params int[] ids) : base(c => ids.Contains(c.Id))
{
}
}
}