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