public void Upvote(UpvoteDomain model)
 {
     _dataProvider.ExecuteNonQuery(
         "concern_upvote",
         inputParamMapper : delegate(SqlParameterCollection paramCol)
     {
         paramCol.AddWithValue("@Id", model.Id);
     }
         );
 }
예제 #2
0
 public HttpResponseMessage Upvote(UpvoteDomain model)
 {
     if (ModelState.IsValid)
     {
         SuccessResponse resp = new SuccessResponse();
         _concernService.Upvote(model);
         return(Request.CreateResponse(HttpStatusCode.OK, resp));
     }
     else
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
     }
 }