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