Skip to content

Commit

Permalink
Update EfRepository.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonprsousa committed Feb 18, 2021
1 parent 3460b82 commit 68c23a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Clean.Architecture.Infrastructure/Data/EfRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public EfRepository(AppDbContext dbContext)
var specificationResult = ApplySpecification(spec);
return specificationResult.ToListAsync();
}

public IAsyncEnumerable<T> GetAsyncEnumerable<T>() where T : BaseEntity, IAggregateRoot
{
return _dbContext.Set<T>().AsAsyncEnumerable<T>();
}

public async Task<T> AddAsync<T>(T entity) where T : BaseEntity, IAggregateRoot
{
Expand Down

0 comments on commit 68c23a7

Please sign in to comment.