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