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) { }
public DbConnection CreateConnection() { return(MySQLFactory.CreateConnection(connection)); }