Esempio n. 1
0
 public HttpResponseMessage Post([FromBody] UserVote vote)
 {
     try
     {
         _surveyService.AddVote(vote);
         return(Request.CreateResponse(HttpStatusCode.OK));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }