public string Post([FromBody] BcMaterial bcmaterial) { //Create db.BcMaterial.Add(bcmaterial); db.SaveChanges(); return(JsonConvert.SerializeObject(bcmaterial)); }
public string Delete([FromBody] BcMaterial bcmaterial) { db.BcMaterial.Remove(bcmaterial); db.SaveChanges(); return(JsonConvert.SerializeObject("Ok")); }
public void Put(int id, [FromBody] BcMaterial bcmaterial) { //Update db.BcMaterial.Update(bcmaterial); db.SaveChanges(); }