Exemplo n.º 1
0
        public IServiceCollection Bootstrap(IServiceCollection services)
        {
            var config         = services.BuildServiceProvider().GetRequiredService <IConfiguration>();
            var cosmosDbConfig = new CosmosDbConfig();

            config.Bind("CosmosDbPlugin", cosmosDbConfig);

            services.AddScoped <CosmosDbConfig>((serviceProvider) =>
            {
                return(cosmosDbConfig);
            });

            return(services);
        }
Exemplo n.º 2
0
 internal CosmosDbProductsRepository(CosmosDbConfig config) : base(config)
 {
 }
 public CosmosDbRepositoryBase(CosmosDbConfig config)
 {
     this.config = config;
 }