//using context instead of config
 public PostController(ApplicationDbContext context, IConfiguration configuration)
 {
     _postRepository        = new PostRepository(context, configuration);
     _userProfileRepository = new UserProfileRepository(context);
     _postTagRepository     = new PostTagRepository(context);
     _commentRepository     = new CommentRepository(context);
 }
 public PostController(IConfiguration config)
 {
     _postRepository     = new PostRepository(config);
     _categoryRepository = new CategoryRepository(config);
     _tagRepository      = new TagRepository(config);
     _postTagRepository  = new PostTagRepository(config);
 }
 public PostController(ApplicationDbContext context)
 {
     _postRepository = new PostRepository(context);
     _upRepository   = new UserProfileRepository(context);
     _ptRepository   = new PostTagRepository(context);
     _tagRepository  = new TagRepository(context);
 }
예제 #4
0
 public PostController(Account _account, PostRepository _post_repo, TagRepository _tag_repo, PostTagRepository _post_tag_repo, CategoryPostRepository _category_post_repository, CategoryRepository _category_repository)
 {
     this._account                  = _account;
     this._post_repo                = _post_repo;
     this._tag_repo                 = _tag_repo;
     this._post_tag_repo            = _post_tag_repo;
     this._category_repository      = _category_repository;
     this._category_post_repository = _category_post_repository;
 }
 public PostController(IConfiguration config)
 {
     _postRepository     = new PostRepository(config);
     _categoryRepository = new CategoryRepository(config);
     _commentRepository  = new CommentRepository(config);
     _postTagRepository  = new PostTagRepository(config);
     _postTagRepo        = new PostTagRepository(config);
     _subRepo            = new SubscriptionRepository(config);
 }
예제 #6
0
 public PostService(PostRepository postRepository,
                    TagService tagService,
                    PostTagRepository postTagRepository,
                    ElasticService elasticService)
 {
     _postRepository    = postRepository;
     _tagService        = tagService;
     _postTagRepository = postTagRepository;
     _elasticService    = elasticService;
 }
예제 #7
0
 public PostServiceImp(
     PostMapper mapper,
     PostRepository repository,
     CategoryRepository categoryRepository,
     TagRepository tagRepository,
     PostTagRepository postTagRepository
     ) :
     base(mapper, repository)
 {
     _categoryRepository = categoryRepository;
     _tagRepository      = tagRepository;
     _postTagRepository  = postTagRepository;
 }
예제 #8
0
 public PostController(
     PostService service,
     UserService userService,
     HttpContextExtensible httpContext,
     UserPostCategoryRepository userPostCategories,
     UserPostTagRepository userPostTags,
     PostTagRepository postTagRepository
     ) :
     base(service)
 {
     _userService        = userService;
     _httpContext        = httpContext;
     _userPostCategories = userPostCategories;
     _userPostTags       = userPostTags;
     _postTagRepository  = postTagRepository;
 }
예제 #9
0
 public PostTagController(ApplicationDbContext context)
 {
     _postTagRepository = new PostTagRepository(context);
 }
 public PostTagController(IConfiguration config)
 {
     _postRepo    = new PostRepository(config);
     _tagRepo     = new TagRepository(config);
     _postTagRepo = new PostTagRepository(config);
 }