// IMapper es propio de dotnet, IOptions transforma las appsetings a un objeto del tipo que especifique, hace un mappeo en base a los nombres de las properties. public PhotosController(IAppRepositorio repo, IMapper mapper, IOptions <ConfCloudinary> cloudinaryConfig) { this.repo = repo; this.mapper = mapper; this.cloudinaryConfig = cloudinaryConfig; Account acc = new Account( cloudinaryConfig.Value.CloudName, cloudinaryConfig.Value.ApiKey, cloudinaryConfig.Value.ApiSecret ); this.cloudinary = new Cloudinary(acc); }
public UsuariosController(IAppRepositorio db, IMapper mapper) { this.Mapper = mapper; this.Db = db; }