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