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