* Paging criterias added in BaseSpecification. New paginated specification added (CatalogFilterPaginatedSpecification) . EFRepository cleaned up and paging implementation added. Usage of the new paging infrastructure in CatalogService (Web and WebRazor). * Use IReadOnlyList<T> instead of List<T> as return type from repositories. * - Ordering possibility added in the specification. - Evaluation of the specification placed in separate class.
20 lines
557 B
C#
20 lines
557 B
C#
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; }
|
|
|
|
int Take { get; }
|
|
int Skip { get; }
|
|
bool isPagingEnabled { get;}
|
|
}
|
|
}
|