public PostAppService(IPostService postService, ICommentService commentService, ICategoryService categoryService, IPostValidation postValidation) { this.postService = postService; this.commentService = commentService; this.categoryService = categoryService; this.postValidation = postValidation; }
public PostAppService() { this.postValidation = ValidationFactory.GetPostValidation(); this.postService = ServiceFactory.GetPostService(RepositoryFactory.GetPostRepository(), this.postValidation); this.commentService = ServiceFactory.GetCommentService(RepositoryFactory.GetCommentRepository(), null); this.categoryService = ServiceFactory.GetCategoryService(RepositoryFactory.GetCategoryRepository(), null); }
public static IPostService GetPostService(IPostRepository repository, IPostValidation validation) { return(new PostService(repository, validation)); }
public static IPostService GetPostService(IPostRepository repository, IPostValidation validation) { return new PostService(repository, validation); }
public PostService(IPostRepository postRepository, IPostValidation postValidation) { this.postRepository = postRepository; this.postValidation = postValidation; }