Esempio n. 1
0
        public HttpResponseMessage Put(int id, MyBlogUpdateRequest model)
        {
            _userService.Update(model);

            SuccessResponse resp = new SuccessResponse();

            return(Request.CreateResponse(HttpStatusCode.OK, resp));
        }
Esempio n. 2
0
 public void Update(MyBlogUpdateRequest model)
 {
     _dataProvider.ExecuteNonQuery(
         "BlogPost_Update",
         inputParamMapper : delegate(SqlParameterCollection paramCol)
     {
         paramCol.AddWithValue("@Id", model.Id);
         paramCol.AddWithValue("@Header", model.Header);
         paramCol.AddWithValue("@Description", model.Description);
         paramCol.AddWithValue("@BlogPost", model.BlogPost);
         paramCol.AddWithValue("@Image", model.Image);
     }
         );
 }