示例#1
0
        // private readonly IOptions<CloudinarySettings> cloudinaryConfig;

        public PhotosController(
            IPhotoBookRepository repo,
            IMapper mapper
            // IOptions<CloudinarySettings> cloudinaryConfig
            )
        {
            this.repo   = repo;
            this.mapper = mapper;
            // this.cloudinaryConfig = cloudinaryConfig;
        }
        public UserPhotosController(
            IPhotoBookRepository repo,
            IMapper mapper,
            IOptions <CloudinarySettings> cloudinaryConfig)
        {
            this.cloudinaryConfig = cloudinaryConfig;
            this.mapper           = mapper;
            this.repo             = repo;

            Account account = new Account(
                this.cloudinaryConfig.Value.CloudName,
                this.cloudinaryConfig.Value.ApiKey,
                this.cloudinaryConfig.Value.ApiSecret
                );

            this.cloudinary = new Cloudinary(account);
        }
示例#3
0
 public MessagesController(IPhotoBookRepository repo, IMapper mapper)
 {
     this.mapper = mapper;
     this.repo   = repo;
 }