diff options
| -rw-r--r-- | API/Database/DbRepository.cs | 4 | ||||
| -rw-r--r-- | Models/Interfaces/Database/IRepository.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/API/Database/DbRepository.cs b/API/Database/DbRepository.cs index b961a54..ea1593a 100644 --- a/API/Database/DbRepository.cs +++ b/API/Database/DbRepository.cs @@ -33,13 +33,13 @@ namespace API.Database .FindAsync(id); } - public async Task<IAsyncEnumerable<TEntity>> Query(int count) + public IEnumerable<TEntity> Query(int count) { return this._context .Set<TEntity>() .AsNoTracking() .Take(count) - .AsAsyncEnumerable(); + .AsEnumerable(); } //Update diff --git a/Models/Interfaces/Database/IRepository.cs b/Models/Interfaces/Database/IRepository.cs index e38bb82..449a807 100644 --- a/Models/Interfaces/Database/IRepository.cs +++ b/Models/Interfaces/Database/IRepository.cs @@ -10,7 +10,7 @@ namespace Models.Interfaces.Database Task AddAsync(TEntity entity); //Return *count* instances of Entity from the database - Task<IAsyncEnumerable<TEntity>> Query(int count); + IEnumerable<TEntity> Query(int count); //Find entity by id Task<TEntity> FindByIdAsync(object id); |
