public HttpResponseMessage Update(AudioUpdateRequest req) { if (!ModelState.IsValid) { Request.CreateErrorResponse(HttpStatusCode.OK, ModelState); } audioServices.Update(req); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public void Update(AudioUpdateRequest req) { dataProvider.ExecuteNonQuery( "Audio_update", delegate(SqlParameterCollection parameter) { parameter.AddWithValue("@id", req.Id); parameter.AddWithValue("@url", req.Url); parameter.AddWithValue("@audio_question_id", req.AudioQuestionId); parameter.AddWithValue("@rating", req.Rating); parameter.AddWithValue("@total_ratings", req.TotalRatings); }); }