public void Inistall() { MyDbFactory = GetFactory(); MyConnection = MyDbFactory.CreateConnection(); var myConnection = MyConnection; if (myConnection == null) { return; } myConnection.ConnectionString = CurConStr; AppCons.Connection = MyConnection; }
public override DbConnection CreateConnection() { if (MyConnection != null) { DbConnection connect = base.MyConnection; return(connect); } else { DbConnection connect = MyDbFactory.CreateConnection(); connect.ConnectionString = CurConStr; return(connect); } }
public Startup(IConfiguration configuration) { Configuration = configuration; MyDbFactory.Setup(Configuration["MySqlConnectionString"], Configuration["SqlConnectionString"]); }