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