/// <summary> /// Constructor that accepts dependencies. /// </summary> public BlogController( IBlogPostRepository blogPostRepository, IPostCommentRepository postCommentRepository, IUserRepository userRepository, IVariableRepository variableRepository) { this._blogPostRepository = blogPostRepository; this._postCommentRepository = postCommentRepository; this._userRepository = userRepository; this._variableRepository = variableRepository; this._blogPostsPerPage = Convert.ToInt32(ConfigurationManager.AppSettings["BlogPostsPerPage"]); }
public HomeController(IGridUpdateRepository gridUpdateRepository, IPostRepository postRepository, IPostLikeRepository postLikeRepository, IPostCommentRepository postCommentRepository, IUnitOfWork unitOfWork) { _gridUpdateRepository = gridUpdateRepository; _postRepository = postRepository; _postLikeRepository = postLikeRepository; _postCommentRepository = postCommentRepository; _unitOfWork = unitOfWork; }
private static string CreatePostComment(IPostCommentRepository repository, string author, string title, Uri website, MailAddress email, string body) { var postComment = repository.Create(); postComment.Author = author; postComment.Title = title; postComment.Website = website == null ? null : website.ToString(); postComment.Body = body; postComment.Email = email == null ? null : email.Address; repository.Save(postComment); repository.SubmitChanges(); return(postComment.ID); }
public PostCommentMessageProcessor(IPostCommentRepository postCommentRepository, IPostRepository postRepository) : base("POSTCOMMENT") { _postCommentRepository = postCommentRepository; _postRepository = postRepository; }
public PostCommentService(IPostCommentRepository postCommentRepository) { _postCommentRepository = postCommentRepository; }
public PostCommentService(IPostCommentRepository repository) { _repository = repository; }
protected override void OnSetUpMocks() { base.OnSetUpMocks(); _postCommentRepositoryMock = MockRepository.StrictMock <IPostCommentRepository>(); }
public PostCommentController(IPostCommentRepository postCommentRepository) { _postCommentRepository = postCommentRepository; }
public LatestPostCommentsController(IPostCommentRepository postCommentRepository) { _postCommentRepository = postCommentRepository; }