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; }
public PostService(IPostRespository postRepository, IUnitOfWord unitOfWord) { this._postRepository = postRepository; this._unitOfWord = unitOfWord; }
public PostController(IPostRespository postRespository) { respository = postRespository; }