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