public async Task <IActionResult> Update(int Id) { var CurrentUser = await _userManager.GetUserAsync(User); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { if (await _checkProvider.CheckIfRecordExists("Properties", "PropertyID", Id) == 0) { return(BadRequest(new { IsSuccess = false, Message = "No record with this ID", })); } var Property = await _propertyProvider.UpdateGet(CurrentUser.Id, Id); Property = await UpdateAddDropDownBoxes(Property, CurrentUser.Id); return(Ok(Property)); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }