// POST: api/Managercomments public void Post([FromBody] Managercomments value) { ProjectdbContext db = new ProjectdbContext(); db.Mcom.Add(value); db.SaveChanges(); }
// PUT: api/Managercomments/5 public void Put(int id, [FromBody] Managercomments value) { ProjectdbContext db = new ProjectdbContext(); Managercomments com = db.Mcom.Where(emp => emp.Commission == id).FirstOrDefault(); if (com != null) { com.Comments = value.Comments; com.Pid = value.Pid; db.SaveChanges(); } }