public ActionResult DeleteUser(int userId) { var userFromRepo = _croudSeekRepository.GetUser(userId); if (userFromRepo == null) { return(NotFound()); } _croudSeekRepository.DeleteUser(userFromRepo); _croudSeekRepository.Save(); return(NoContent()); }