示例#1
0
 public MySQLConfigureBuilder(Func <IServiceProvider, PrimaryKey, DefaultConfigParameter, StorageOptions> generator, bool singleton = true) :
     base((provider, id, parameter) =>
 {
     var result                  = generator(provider, id, parameter);
     result.Connection           = provider.GetService <IOptions <MySQLConnections> >().Value.ConnectionDict[result.ConnectionKey];
     result.CreateConnectionFunc = connection => MySQLFactory.CreateConnection(connection);
     result.BuildRepository      = new MySQLBuildService(result);
     return(result);
 }, singleton)
 {
 }
示例#2
0
 public DbConnection CreateConnection()
 {
     return(MySQLFactory.CreateConnection(connection));
 }