public void Put(string id, [FromBody] MyInfo.Model.Info info) { // Important to set the Id // this distinquished add from update !!! info.Id = Convert.ToInt32(id); info.Save(); }
public int Post([FromBody] MyInfo.Model.Info info) { // t.id = tasks.Count; // MyInfo.Model.Task task = new MyInfo.Model.Task(); return(info.Save()); }
// PUT public void Post([FromBody] MyInfo.Model.Info info) { // t.id = tasks.Count; // MyInfo.Model.Task task = new MyInfo.Model.Task(); info.Save(); }