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:
Eric Fleming
2020-06-08 13:31:22 -04:00
committed by GitHub
parent 1b5b12ec11
commit 70a919e145
28 changed files with 45 additions and 310 deletions

View File

@@ -1,4 +1,5 @@
using Microsoft.eShopWeb.ApplicationCore.Entities;
using Ardalis.Specification;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;
using System.Threading.Tasks;

View File

@@ -1,16 +0,0 @@
using Microsoft.eShopWeb.ApplicationCore.Helpers.Query;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface IIncludeQuery
{
Dictionary<IIncludeQuery, string> PathMap { get; }
IncludeVisitor Visitor { get; }
HashSet<string> Paths { get; }
}
public interface IIncludeQuery<TEntity, out TPreviousProperty> : IIncludeQuery
{
}
}

View File

@@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
{
public interface ISpecification<T>
{
Expression<Func<T, bool>> Criteria { get; }
List<Expression<Func<T, object>>> Includes { get; }
List<string> IncludeStrings { get; }
Expression<Func<T, object>> OrderBy { get; }
Expression<Func<T, object>> OrderByDescending { get; }
Expression<Func<T, object>> GroupBy { get; }
int Take { get; }
int Skip { get; }
bool IsPagingEnabled { get;}
}
}