public SQLServerConfigureBuilder(Func <IServiceProvider, PrimaryKey, DefaultConfigParameter, StorageOptions> generator, bool singleton = true) : base((provider, id, parameter) => { var result = generator(provider, id, parameter); result.Connection = provider.GetService <IOptions <SQLServerConnections> >().Value.ConnectionDict[result.ConnectionKey]; result.CreateConnectionFunc = connection => SQLServerFactory.CreateConnection(connection); result.BuildRepository = new SQLServerBuildService(result); return(result); }, singleton) { }
public DbConnection CreateConnection() { return(SQLServerFactory.CreateConnection(connection)); }