// POST api/values public HttpResponseMessage AddItem([FromBody] ItemBO item) { Guid itemid = dl.InsertItem(item); if (itemid != null && itemid != Guid.Empty) { return(Request.CreateResponse(HttpStatusCode.OK, itemid, Configuration.Formatters.JsonFormatter)); } else { return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }
public void InsertItem(string Name, string Desc, double Price) { ItemDL DL = new ItemDL(); DL.InsertItem(Name, Desc, Price); }