Created
January 6, 2020 14:12
-
-
Save merken/8936b00bb76fcae92402ae8fe8e44f88 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data; | |
using System.Data.Common; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Prise.Plugin; | |
namespace TableStoragePlugin | |
{ | |
[PluginBootstrapper(PluginType = typeof(TableStorageProductsRepository))] | |
public class TableStorageBootstrapper : IPluginBootstrapper | |
{ | |
public IServiceCollection Bootstrap(IServiceCollection services) | |
{ | |
var config = services.BuildServiceProvider().GetRequiredService<IConfiguration>(); | |
var tableStorageConfig = new TableStorageConfig(); | |
config.Bind("TableStoragePlugin", tableStorageConfig); | |
services.AddScoped<TableStorageConfig>((serviceProvider) => | |
{ | |
return tableStorageConfig; | |
}); | |
return services; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment