UserController Update

This commit is contained in:
thermalthrottle
2021-03-19 09:34:00 +02:00
parent 9a4fa93aad
commit 729441fda7

View File

@@ -33,12 +33,13 @@ namespace Business.Business.UserManagment
throw new ArgumentException("Insufficient Role!"); throw new ArgumentException("Insufficient Role!");
} }
} }
public void CheckIfUserEverCreated() public bool CheckIfUserEverCreated()
{ {
if (!context.User.ToList().Any()) if (context.User.ToList().Any())
{ {
throw new ArgumentException("No users in the database!"); return false;
} }
return true;
} }
public User Get(int id) public User Get(int id)
{ {