public IHttpActionResult DeleteContentPage(ContentPage contentPageModel) { try { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (contentPageModel.Id != 0) { contentPageModel.isDelete = true; contentPageService.UpdateContentPage(contentPageModel); } return(Ok()); } catch (Exception) { return(BadRequest()); } }