diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-10 13:48:34 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-10 13:48:34 +0200 |
| commit | 7941f1ab479b72ee53e94aef54b8390d21d36f84 (patch) | |
| tree | 0c73ae15d92244a8c6477d47d287e5d4d27ea247 | |
| parent | b22378ffd9c0d8be101cd20fdfa121cce4e915e2 (diff) | |
| download | DevHive-7941f1ab479b72ee53e94aef54b8390d21d36f84.tar DevHive-7941f1ab479b72ee53e94aef54b8390d21d36f84.tar.gz DevHive-7941f1ab479b72ee53e94aef54b8390d21d36f84.zip | |
Removed async from DbRepo/Query
| -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); |
