/// <summary> /// Creates a new comment for a blog entry. /// </summary> public static Comment CreateComment(CommentController commentController, BlogEntry blogEntry, string commentTitle, DateTime commentDatePublished) { // Create comment var commentToCreate = CommentFactory.Get(); commentToCreate.BlogEntryId = blogEntry.Id; commentToCreate.Title = commentTitle; commentToCreate.DatePublished = commentDatePublished; // Add to blog entry commentController.Create(commentToCreate); return commentToCreate; }
public void Initialize() { _controllerFactory = new ControllerFactory(); _commentController = _controllerFactory.GetCommentController(); }