public PostsController(
            IPostRespository repo, IMapper mapper,
            IProviderRespository provider, IOptions <CloudinarySettings> cloudinaryCfg,
            IMainRespository mainRepo)
        {
            _cloudinaryCfg = cloudinaryCfg;
            _provider      = provider;
            _mapper        = mapper;
            _repo          = repo;
            _mainRepo      = mainRepo;

            Account acc = new Account(
                _cloudinaryCfg.Value.CloudName,
                _cloudinaryCfg.Value.ApiKey,
                _cloudinaryCfg.Value.ApiSecret
                );

            _cloudinary = new Cloudinary(acc);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PostService"/> class.
 /// </summary>
 /// <param name="mapper">the mapper.</param>
 /// <param name="postRepository">the post respository.</param>
 public PostService(IMapper mapper,
                    IPostRespository postRepository)
 {
     _mapper         = mapper;
     _postRepository = postRepository;
 }
Exemple #3
0
 public PostService(IPostRespository postRepository, IUnitOfWord unitOfWord)
 {
     this._postRepository = postRepository;
     this._unitOfWord     = unitOfWord;
 }
Exemple #4
0
 public PostController(IPostRespository postRespository)
 {
     respository = postRespository;
 }