From fcdecc38741dc8e3adb41897ee294aa6d1384128 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 10 Dec 2020 21:23:46 +0200 Subject: Added data validations of UserService requests --- API/Database/DbRepository.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'API/Database/DbRepository.cs') 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 Query(int count) + public IEnumerable Query() { return this._context .Set() .AsNoTracking() - .Take(count) .AsEnumerable(); } + public IEnumerable 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 +} -- cgit v1.2.3