From 5e188ebfcff04a4c4a49429ec4d0c2f845bfb7be Mon Sep 17 00:00:00 2001 From: Argo-Surface Date: Sat, 12 Jan 2019 00:34:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=EF=BC=9A?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=96=87=E4=BB=B6=E5=A2=9E=E5=8A=A0=E5=A4=9A?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Bootstrap.DataAccess/BootstrapAdminStartup.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/UniTest/Bootstrap.DataAccess/BootstrapAdminStartup.cs b/UniTest/Bootstrap.DataAccess/BootstrapAdminStartup.cs index 76cb2d88..11b94996 100644 --- a/UniTest/Bootstrap.DataAccess/BootstrapAdminStartup.cs +++ b/UniTest/Bootstrap.DataAccess/BootstrapAdminStartup.cs @@ -8,9 +8,19 @@ namespace Bootstrap.DataAccess { public BootstrapAdminStartup() { + var sqlConnectionStrings = "Data Source=.;Initial Catalog=UnitTest;User ID=sa;Password=sa"; + var mysqlConnectionStrings = "Server=10.211.55.2;Database=BA;Uid=argozhang;Pwd=argo@163.com;SslMode=none;"; var config = new ConfigurationBuilder().AddInMemoryCollection(new KeyValuePair[] { - new KeyValuePair("ConnectionStrings:ba", "Data Source=.;Initial Catalog=UnitTest;User ID=sa;Password=sa"), + new KeyValuePair("ConnectionStrings:ba", sqlConnectionStrings), new KeyValuePair("DB:0:Enabled", "false"), + + new KeyValuePair("DB:1:Enabled", "false"), + new KeyValuePair("DB:1:ProviderName", "SQLite"), + new KeyValuePair("DB:1:ConnectionStrings:ba", "Data Source=UnitTest.db"), + + new KeyValuePair("DB:2:Enabled", "false"), + new KeyValuePair("DB:2:ProviderName", "MySql"), + new KeyValuePair("DB:2:ConnectionStrings:ba", mysqlConnectionStrings), new KeyValuePair("LongbowCache:Enabled", "false") }).Build(); var sc = new ServiceCollection();