diff options
Diffstat (limited to 'API/Database/DbRepository.cs')
| -rw-r--r-- | API/Database/DbRepository.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/API/Database/DbRepository.cs b/API/Database/DbRepository.cs index acb91dc..184adb4 100644 --- a/API/Database/DbRepository.cs +++ b/API/Database/DbRepository.cs @@ -34,15 +34,19 @@ namespace API.Database .FindAsync(id); } - public IEnumerable<TEntity> Query(int count) + public IEnumerable<TEntity> Query() { return this._context .Set<TEntity>() .AsNoTracking() - .Take(count) .AsEnumerable(); } + public IEnumerable<TEntity> Query(int count) + { + return this.Query().Take(count); + } + //Update public async Task EditAsync(object id, TEntity newEntity) { @@ -66,4 +70,4 @@ namespace API.Database await this._context.SaveChangesAsync(); } } -}
\ No newline at end of file +} |
