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