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