diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-10 21:23:46 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2020-12-10 21:23:46 +0200 |
| commit | fcdecc38741dc8e3adb41897ee294aa6d1384128 (patch) | |
| tree | 683eea600faa7ce9d265d04aad325c6e23968447 /API/Database | |
| parent | 0bd15454f29e30438b28ca0e27887de6b765fb11 (diff) | |
| download | DevHive-fcdecc38741dc8e3adb41897ee294aa6d1384128.tar DevHive-fcdecc38741dc8e3adb41897ee294aa6d1384128.tar.gz DevHive-fcdecc38741dc8e3adb41897ee294aa6d1384128.zip | |
Added data validations of UserService requests
Diffstat (limited to 'API/Database')
| -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 +} |
