示例#1
0
        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());
        }
示例#2
0
 public static List <ManagerComment> DeleteManagerComments(ManagerComment comment)
 {
     dataContext.ManagerComments.Remove(comment);
     dataContext.SaveChanges();
     return(GetAllManagerComments());
 }
示例#3
0
 public static List <ManagerComment> InsertManagerComments(ManagerComment comment)
 {
     dataContext.ManagerComments.Add(comment);
     dataContext.SaveChanges();
     return(GetAllManagerComments());
 }