Example #1
0
 public HttpResponseMessage CreateSms([FromBody] SMS sms)
 {
     try
     {
         var s = DAL.AddSms(sms);
         return(Request.CreateResponse(HttpStatusCode.OK, s));
     }
     catch (Exception e)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, e.Message));
     }
 }