public async Task <IActionResult> DeleteAsync(int id) { if (await _repo.GetUserByIdAsync(id) is Domain.Models.Users u) { _repo.DeleteUserAsync(id); await _repo.SaveAsync(); return(Ok("Admin removed.")); } return(NotFound("User doesn't exist")); }
public async Task <IActionResult> DeleteAsync(int id) { if (await _repo.GetUserByIdAsync(id) is Domain.Models.Users u) { _repo.DeleteUserAsync(id); await _repo.SaveAsync(); return(Ok("Admin removed.")); } return(NotFound("User doesn't exist")); }