Browse Source

Remove count

main
Eric Fleming 7 years ago
parent
commit
1ba52becaa
  1. 1
      src/ApplicationCore/Interfaces/IRepository.cs
  2. 5
      src/Infrastructure/Data/EfRepository.cs

1
src/ApplicationCore/Interfaces/IRepository.cs

@ -6,6 +6,5 @@ namespace Microsoft.eShopWeb.ApplicationCore.Interfaces
public interface IRepository<T> where T : BaseEntity public interface IRepository<T> where T : BaseEntity
{ {
T GetSingleBySpec(ISpecification<T> spec); T GetSingleBySpec(ISpecification<T> spec);
int Count(ISpecification<T> spec);
} }
} }

5
src/Infrastructure/Data/EfRepository.cs

@ -45,11 +45,6 @@ namespace Microsoft.eShopWeb.Infrastructure.Data
return await ApplySpecification(spec).ToListAsync(); return await ApplySpecification(spec).ToListAsync();
} }
public int Count(ISpecification<T> spec)
{
return ApplySpecification(spec).Count();
}
public async Task<int> CountAsync(ISpecification<T> spec) public async Task<int> CountAsync(ISpecification<T> spec)
{ {
return await ApplySpecification(spec).CountAsync(); return await ApplySpecification(spec).CountAsync();

Loading…
Cancel
Save