示例#1
0
 public void DeleteComment(Comment comment)
 {
     _dbContext.Comments.Remove(comment);
     _dbContext.SaveChanges();
 }
示例#2
0
 public void EditComment(Comment comment)
 {
     _dbContext.Entry(comment).State = EntityState.Modified;
     _dbContext.SaveChanges();
 }
示例#3
0
 public void CreateComment(Comment comment)
 {
     _dbContext.Comments.Add(comment);
     _dbContext.SaveChanges();
 }