Example #1
0
 public void UpdateValue(PageMetaTagsUpdateValueRequest model)
 {
     DataProvider.ExecuteNonQuery("dbo.PageMetaTags_UpdateValue"
                                  , inputParamMapper : delegate(SqlParameterCollection paramCollection)
     {
         paramCollection.AddWithValue("@Id", model.Id);
         paramCollection.AddWithValue("@Value", model.Value);
     });
 }
 public HttpResponseMessage UpdateValue(PageMetaTagsUpdateValueRequest model)
 {
     if (!ModelState.IsValid)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
     }
     try
     {
         _pageMetaTagsService.UpdateValue(model);
         return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse()));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }