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)); } }
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)); } }