public HttpResponseMessage Edit(BlogCommentUpdateRequest model) { if (!ModelState.IsValid) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState)); } BlogCommentService.Update(model); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public static void Update(BlogCommentUpdateRequest model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.BlogComment_Update", inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", model.Id); MapCommonParameter(model, paramCollection); } ); return; }