public void CreateComment(Managercomment comment) { display d = new display(); d.comments.Add(comment); d.SaveChanges(); }
public void Delete(int id) { display d = new display(); Managercomment mn = SearchById(id, d); d.comments.Remove(mn); d.SaveChanges(); }
public void Edit(Managercomment m, int id) { display d = new display(); Managercomment man = SearchById(id, d); man.comment = m.comment; man.protaskId = m.protaskId; d.SaveChanges(); }
// PUT: api/managercomm/5 public void Put(int id, Managercomment value) { managercomm_repository manrepo = new managercomm_repository(); manrepo.Edit(value, id); }
// POST: api/managercomm public void Post(Managercomment value) { managercomm_repository manrepo = new managercomm_repository(); manrepo.CreateComment(value); }