public static IServiceCollection AddLykkeTemplateAzureRepositories(this IServiceCollection services, LykkeTemplateAzureConfig config) { services.AddSingleton <ISamplesRepository>( new SamplesRepository(new AzureTableStorage <SampleEntity>( config.ConnectionString, "Samples", config.Logger))); return(services); }
public static IServiceCollection AddLykkeTemplateAzureRepositories(this IServiceCollection services, Action <LykkeTemplateAzureConfig> configurator) { var config = new LykkeTemplateAzureConfig(); configurator.Invoke(config); return(AddLykkeTemplateAzureRepositories(services, config)); }