Browse Source

Merge pull request #280 from JohnCOsborne/master

Capitalized isPaging property
main
Eric Fleming 6 years ago
committed by GitHub
parent
commit
6eba16b09b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ApplicationCore/Interfaces/ISpecification.cs
  2. 4
      src/ApplicationCore/Specifications/BaseSpecification.cs
  3. 2
      src/Infrastructure/Data/SpecificationEvaluator.cs

2
src/ApplicationCore/Interfaces/ISpecification.cs

@ -15,6 +15,6 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
int Take { get; } int Take { get; }
int Skip { get; } int Skip { get; }
bool isPagingEnabled { get;} bool IsPagingEnabled { get;}
} }
} }

4
src/ApplicationCore/Specifications/BaseSpecification.cs

@ -20,7 +20,7 @@ namespace Microsoft.eShopWeb.ApplicationCore.Specifications
public int Take { get; private set; } public int Take { get; private set; }
public int Skip { get; private set; } public int Skip { get; private set; }
public bool isPagingEnabled { get; private set; } = false; public bool IsPagingEnabled { get; private set; } = false;
protected virtual void AddInclude(Expression<Func<T, object>> includeExpression) protected virtual void AddInclude(Expression<Func<T, object>> includeExpression)
{ {
@ -34,7 +34,7 @@ namespace Microsoft.eShopWeb.ApplicationCore.Specifications
{ {
Skip = skip; Skip = skip;
Take = take; Take = take;
isPagingEnabled = true; IsPagingEnabled = true;
} }
protected virtual void ApplyOrderBy(Expression<Func<T, object>> orderByExpression) protected virtual void ApplyOrderBy(Expression<Func<T, object>> orderByExpression)
{ {

2
src/Infrastructure/Data/SpecificationEvaluator.cs

@ -41,7 +41,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
} }
// Apply paging if enabled // Apply paging if enabled
if (specification.isPagingEnabled) if (specification.IsPagingEnabled)
{ {
query = query.Skip(specification.Skip) query = query.Skip(specification.Skip)
.Take(specification.Take); .Take(specification.Take);

Loading…
Cancel
Save