Switching to NuGet Ardalis.Specifications (#389)
- updating to use Ardalis.Specifications package as it is maintained and has a more robust implementation - Removing all custom specification implementation - Updating unit tests
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
|
||||
using Ardalis.Specification;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities.BasketAggregate;
|
||||
|
||||
namespace Microsoft.eShopWeb.ApplicationCore.Specifications
|
||||
{
|
||||
public sealed class BasketWithItemsSpecification : BaseSpecification<Basket>
|
||||
{
|
||||
public BasketWithItemsSpecification(int basketId)
|
||||
:base(b => b.Id == basketId)
|
||||
public BasketWithItemsSpecification(int basketId) : base(b => b.Id == basketId)
|
||||
{
|
||||
AddInclude(b => b.Items);
|
||||
}
|
||||
public BasketWithItemsSpecification(string buyerId)
|
||||
:base(b => b.BuyerId == buyerId)
|
||||
public BasketWithItemsSpecification(string buyerId) : base(b => b.BuyerId == buyerId)
|
||||
{
|
||||
AddInclude(b => b.Items);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user