public IActionResult Delete(string id) { var userapi = _userApiService.GetUserById(id); if (userapi == null) { throw new ArgumentException("No user found with the specified id"); } if (ModelState.IsValid) { _userApiService.DeleteUserApi(userapi); return(new NullJsonResult()); } return(ErrorForKendoGridJson(ModelState)); }