- fixed ObjectUtils key conflicts
- add support for SmartSqlMapper multiple instance injection
- add support for IServiceProvider.GetSmartSqlMapper(string configPath)
var smartSqlMapper = serviceProvider.GetSmartSqlMapper("SmartSql");
var smartSqlMapper_1 = serviceProvider.GetSmartSqlMapper("SmartSql-1");
- optimize Options DI for SmartSqlOptions.UseOptions
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("SmartSqlConfig.json", false, true);
var configuration = builder.Build();
var services = new ServiceCollection();
services.AddOptions();
var smartSqlConfigJson = configuration.GetSection("SmartSqlConfig");
services.Configure<SmartSqlConfigOptions>("SmartSql", smartSqlConfigJson);
services.AddSmartSql(sp =>
{
return new SmartSqlOptions
{
ConfigPath= "SmartSql"
}.UseOptions(sp);
});