public HttpResponseMessage Update(TestimonialsUpdateRequest model, int id)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            SucessResponse response = new SucessResponse();

            _TestimonialsService.Update(model);
            return(Request.CreateResponse(response));
        }
Ejemplo n.º 2
0
 public void Update(TestimonialsUpdateRequest model)
 {
     DataProvider.ExecuteNonQuery(GetConnection, "dbo.Testimonial_Update",
                                  inputParamMapper : delegate(SqlParameterCollection t)
     {
         t.AddWithValue("@Id", model.Id);
         t.AddWithValue("@Title", model.Title);
         t.AddWithValue("@Body", model.Body);
         t.AddWithValue("@StarRating", model.@StarRating);
     });
 }