public IHttpActionResult Post(PagesModel model) { try { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _pagesService.InsertAsync(model); return(Ok()); } catch (Exception ex) { return(InternalServerError(ex)); } }