public async Task <IActionResult> Delete(PropertyDeleteGet Property) { var CurrentUser = await _userManager.GetUserAsync(User); if (await _claimCheck.CheckClaim(CurrentUser, "ApplicationRight", this.ControllerContext.RouteData.Values["controller"].ToString() + "\\" + this.ControllerContext.RouteData.Values["action"].ToString())) { //var CheckString = await _classificationProvider.DeletePostCheck(Classification); //if (CheckString.Length == 0) //{ _propertyProvider.DeletePost(CurrentUser.Id, Property.PropertyId); return(Ok(Property)); //} return(BadRequest(new { IsSuccess = false, //Message = CheckString, })); } return(BadRequest(new { IsSuccess = false, Message = "No rights", })); }