public static List <ManagerComment> UpdateManagerComments(ManagerComment comment) { var managerComment = (from comments in dataContext.ManagerComments where comments.ManagerCommentID == comment.ManagerCommentID select comments).SingleOrDefault(); managerComment.Comments = comment.Comments; dataContext.SaveChanges(); return(GetAllManagerComments()); }
public static List <ManagerComment> DeleteManagerComments(ManagerComment comment) { dataContext.ManagerComments.Remove(comment); dataContext.SaveChanges(); return(GetAllManagerComments()); }
public static List <ManagerComment> InsertManagerComments(ManagerComment comment) { dataContext.ManagerComments.Add(comment); dataContext.SaveChanges(); return(GetAllManagerComments()); }