public void SaveComment(Comment comment) { if (comment.ID == 0) { comment.Created = DateTime.Now; _dbContext.Comments.Add(comment); if (SaveCommentEvent != null) SaveCommentEvent(this, comment); } _dbContext.SaveChanges(); }
public void SaveComment(Comment comment) { _repository.SaveComment(comment); }
//event void SaveCommentEventFired(object sender, Comment comment) { // _dbContext.Comments. }
public void DeleteComment(Comment comment) { _dbContext.Comments.Remove(comment); _dbContext.SaveChanges(); }
void comments_AddCommentEvent(object sender, Comment comment) { throw new NotImplementedException(); }