public void DeleteComment(Comment comment) { _dbContext.Comments.Remove(comment); _dbContext.SaveChanges(); }
public void EditComment(Comment comment) { _dbContext.Entry(comment).State = EntityState.Modified; _dbContext.SaveChanges(); }
public void CreateComment(Comment comment) { _dbContext.Comments.Add(comment); _dbContext.SaveChanges(); }