Example #1
0
 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)
 {
 }
Example #2
0
 public DbConnection CreateConnection()
 {
     return(SQLServerFactory.CreateConnection(connection));
 }