Upgrade to use Specification 4.0.0 (#444)
This commit is contained in:
@@ -3,16 +3,20 @@ using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
|
||||
|
||||
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
|
||||
{
|
||||
public sealed class BasketWithItemsSpecification : BaseSpecification<Basket>
|
||||
public sealed class BasketWithItemsSpecification : Specification<Basket>
|
||||
{
|
||||
public BasketWithItemsSpecification(int basketId) : base(b => b.Id == basketId)
|
||||
public BasketWithItemsSpecification(int basketId)
|
||||
{
|
||||
AddInclude(b => b.Items);
|
||||
Query
|
||||
.Where(b => b.Id == basketId)
|
||||
.Include(b => b.Items);
|
||||
}
|
||||
|
||||
public BasketWithItemsSpecification(string buyerId) : base(b => b.BuyerId == buyerId)
|
||||
public BasketWithItemsSpecification(string buyerId)
|
||||
{
|
||||
AddInclude(b => b.Items);
|
||||
Query
|
||||
.Where(b => b.BuyerId == buyerId)
|
||||
.Include(b => b.Items);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user