From 29b2a82d7ef2613b3e56eba7ed959243a98ae92d Mon Sep 17 00:00:00 2001 From: transtrike Date: Fri, 11 Dec 2020 18:41:14 +0200 Subject: Changed returns to IActionResult; Id from UserDTO removed --- API/Database/UserDbRepository.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'API/Database/UserDbRepository.cs') diff --git a/API/Database/UserDbRepository.cs b/API/Database/UserDbRepository.cs index 2aa1b55..b8bf8e4 100644 --- a/API/Database/UserDbRepository.cs +++ b/API/Database/UserDbRepository.cs @@ -28,5 +28,12 @@ namespace API.Database return this._dbRepository.DbSet .Any(x => x.Id == id); } + + public bool HasThisUsername(int id, string username) + { + return this._dbRepository.DbSet + .Any(x => x.Id == id && + x.UserName == username); + } } } -- cgit v1.2.3