diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo0_SqlSugarClient.cs b/Src/Asp.Net/MySqlTest/Demo/Demo0_SqlSugarClient.cs index 5a06f8fcf..568bb37d6 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo0_SqlSugarClient.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo0_SqlSugarClient.cs @@ -28,7 +28,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString,//Master Connection - DbType = DbType.SqlServer, + DbType = DbType.MySql, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, SlaveConnectionConfigs = new List() { @@ -53,7 +53,7 @@ namespace OrmTest Console.WriteLine("#### SqlSugarClient Start ####"); SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -146,7 +146,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, - DbType = DbType.SqlServer, + DbType = DbType.MySql, IsAutoCloseConnection = true, InitKeyType = InitKeyType.Attribute, ConfigureExternalServices = new ConfigureExternalServices() @@ -209,7 +209,7 @@ namespace OrmTest new ConnectionConfig() { ConfigId = 1, - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -226,8 +226,8 @@ namespace OrmTest Console.WriteLine("#### Distributed TransactionExample Start ####"); SqlSugarClient db = new SqlSugarClient(new List() { - new ConnectionConfig(){ ConfigId="1", DbType=DbType.SqlServer, ConnectionString=Config.ConnectionString,InitKeyType=InitKeyType.Attribute,IsAutoCloseConnection=true }, - new ConnectionConfig(){ ConfigId="2", DbType=DbType.SqlServer, ConnectionString=Config.ConnectionString2 ,InitKeyType=InitKeyType.Attribute ,IsAutoCloseConnection=true} + new ConnectionConfig(){ ConfigId="1", DbType=DbType.MySql, ConnectionString=Config.ConnectionString,InitKeyType=InitKeyType.Attribute,IsAutoCloseConnection=true }, + new ConnectionConfig(){ ConfigId="2", DbType=DbType.MySql, ConnectionString=Config.ConnectionString2 ,InitKeyType=InitKeyType.Attribute ,IsAutoCloseConnection=true} }); //use db1 @@ -352,7 +352,7 @@ namespace OrmTest Db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, - DbType = DbType.SqlServer, + DbType = DbType.MySql, IsAutoCloseConnection = true, InitKeyType = InitKeyType.Attribute, AopEvents = new AopEvents() @@ -386,7 +386,7 @@ namespace OrmTest Db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, - DbType = DbType.SqlServer, + DbType = DbType.MySql, IsAutoCloseConnection = true, InitKeyType = InitKeyType.Attribute, AopEvents = new AopEvents() diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs index fa82db4e7..23d879b2d 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo1_Queryable.cs @@ -189,7 +189,7 @@ namespace OrmTest Console.WriteLine("#### No Entity Start ####"); var db = GetInstance(); - var list = db.Queryable().AS("order ").Where("id=id", new { id = 1 }).ToList(); + var list = db.Queryable().AS("order").Where("id=id", new { id = 1 }).ToList(); var list2 = db.Queryable("o").AS("order").AddJoinInfo("OrderDetail", "i", "o.id=i.OrderId").Where("id=id", new { id = 1 }).Select("o.*").ToList(); Console.WriteLine("#### No Entity End ####"); @@ -252,7 +252,7 @@ namespace OrmTest //id=@id var list4 = db.Queryable().Where("id=@id", new { id = 1 }).ToList(); //id=@id or name like '%'+@name+'%' - var list5 = db.Queryable().Where("id=@id or name like '%'+@name+'%' ", new { id = 1, name = "jack" }).ToList(); + var list5 = db.Queryable().Where("id=@id or name like @name ", new { id = 1, name = "%jack%" }).ToList(); @@ -323,7 +323,7 @@ namespace OrmTest { return new SqlSugarClient(new ConnectionConfig() { - DbType = SqlSugar.DbType.SqlServer, + DbType = SqlSugar.DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo2_Updateable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo2_Updateable.cs index a4caa3045..f53814a44 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo2_Updateable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo2_Updateable.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -78,8 +78,8 @@ namespace OrmTest var dtList = new List>(); dtList.Add(dt); - var t66 = db.Updateable(dt).AS("[Order]").WhereColumns("id").ExecuteCommand(); - var t666 = db.Updateable(dtList).AS("[Order]").WhereColumns("id").ExecuteCommand(); + var t66 = db.Updateable(dt).AS("`order`").WhereColumns("id").ExecuteCommand(); + var t666 = db.Updateable(dtList).AS("`order`").WhereColumns("id").ExecuteCommand(); diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo3_Insertable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo3_Insertable.cs index e366d0f3e..01461a36b 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo3_Insertable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo3_Insertable.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo4_Deleteable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo4_Deleteable.cs index 8e39e2013..cffdbfe0b 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo4_Deleteable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo4_Deleteable.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo5_SqlQueryable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo5_SqlQueryable.cs index e98be52a1..34d81b53a 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo5_SqlQueryable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo5_SqlQueryable.cs @@ -16,20 +16,20 @@ namespace OrmTest Console.WriteLine("#### SqlQueryable Start ####"); SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true }); int total = 0; - var list = db.SqlQueryable("select * from [order]").ToPageList(1, 2, ref total); + var list = db.SqlQueryable("select * from `order`").ToPageList(1, 2, ref total); //by expression - var list2 = db.SqlQueryable("select * from [order]").Where(it => it.Id == 1).ToPageList(1, 2); + var list2 = db.SqlQueryable("select * from `order`").Where(it => it.Id == 1).ToPageList(1, 2); //by sql - var list3 = db.SqlQueryable("select * from [order]").Where("id=@id", new { id = 1 }).ToPageList(1, 2); + var list3 = db.SqlQueryable("select * from `order`").Where("id=@id", new { id = 1 }).ToPageList(1, 2); Console.WriteLine("#### SqlQueryable End ####"); } diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo6_Queue.cs b/Src/Asp.Net/MySqlTest/Demo/Demo6_Queue.cs index 666fd27ee..f88cd773c 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo6_Queue.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo6_Queue.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -43,7 +43,7 @@ namespace OrmTest db.Queryable().AddQueue(); db.Queryable().AddQueue(); - db.AddQueue("select * from [Order] where id=@id", new { id = 10000 }); + db.AddQueue("select * from `order` where id=@id", new { id = 10000 }); var result2 = db.SaveQueues(); Console.WriteLine("#### Queue End ####"); diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo7_Ado.cs b/Src/Asp.Net/MySqlTest/Demo/Demo7_Ado.cs index a4a7ba2db..45eebba56 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo7_Ado.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo7_Ado.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -30,13 +30,13 @@ namespace OrmTest } }); //sql - var dt = db.Ado.GetDataTable("select * from [order] where @id>0 or name=@name", new List(){ + var dt = db.Ado.GetDataTable("select * from `order` where @id>0 or name=@name", new List(){ new SugarParameter("@id",1), new SugarParameter("@name","2") }); //sql - var dt2 = db.Ado.GetDataTable("select * from [order] where @id>0 or name=@name", new { id = 1, name = "2" }); + var dt2 = db.Ado.GetDataTable("select * from `order` where @id>0 or name=@name", new { id = 1, name = "2" }); //Stored Procedure //var dt3 = db.Ado.UseStoredProcedure().GetDataTable("sp_school", new { name = "张三", age = 0 }); @@ -47,9 +47,9 @@ namespace OrmTest //There are many methods to under db.ado - var list= db.Ado.SqlQuery("select * from [order] "); + var list= db.Ado.SqlQuery("select * from `order` "); var intValue=db.Ado.SqlQuerySingle("select 1"); - db.Ado.ExecuteCommand("delete [order] where id>1000"); + db.Ado.ExecuteCommand("delete from `order` where id>1000"); //db.Ado.xxx Console.WriteLine("#### Ado End ####"); } diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo8_Saveable.cs b/Src/Asp.Net/MySqlTest/Demo/Demo8_Saveable.cs index 79a1ce33a..c1e5259a2 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo8_Saveable.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo8_Saveable.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/Demo9_EntityMain.cs b/Src/Asp.Net/MySqlTest/Demo/Demo9_EntityMain.cs index be795b098..c1d1052e5 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Demo9_EntityMain.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Demo9_EntityMain.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/DemoA_DbMain.cs b/Src/Asp.Net/MySqlTest/Demo/DemoA_DbMain.cs index 206cd6507..1bae9f8c2 100644 --- a/Src/Asp.Net/MySqlTest/Demo/DemoA_DbMain.cs +++ b/Src/Asp.Net/MySqlTest/Demo/DemoA_DbMain.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/DemoB_Aop.cs b/Src/Asp.Net/MySqlTest/Demo/DemoB_Aop.cs index 617d682ec..48a1b7062 100644 --- a/Src/Asp.Net/MySqlTest/Demo/DemoB_Aop.cs +++ b/Src/Asp.Net/MySqlTest/Demo/DemoB_Aop.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true diff --git a/Src/Asp.Net/MySqlTest/Demo/DemoD_DbFirst.cs b/Src/Asp.Net/MySqlTest/Demo/DemoD_DbFirst.cs index db57e0938..0384ce7a7 100644 --- a/Src/Asp.Net/MySqlTest/Demo/DemoD_DbFirst.cs +++ b/Src/Asp.Net/MySqlTest/Demo/DemoD_DbFirst.cs @@ -14,7 +14,7 @@ namespace OrmTest Console.WriteLine("#### DbFirst Start ####"); SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true diff --git a/Src/Asp.Net/MySqlTest/Demo/DemoE_CodeFirst.cs b/Src/Asp.Net/MySqlTest/Demo/DemoE_CodeFirst.cs index 8692517e1..80445ecfa 100644 --- a/Src/Asp.Net/MySqlTest/Demo/DemoE_CodeFirst.cs +++ b/Src/Asp.Net/MySqlTest/Demo/DemoE_CodeFirst.cs @@ -14,7 +14,7 @@ namespace OrmTest Console.WriteLine("#### CodeFirst Start ####"); SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString3, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true diff --git a/Src/Asp.Net/MySqlTest/Demo/DemoF_Utilities.cs b/Src/Asp.Net/MySqlTest/Demo/DemoF_Utilities.cs index 7db24c350..4e492035f 100644 --- a/Src/Asp.Net/MySqlTest/Demo/DemoF_Utilities.cs +++ b/Src/Asp.Net/MySqlTest/Demo/DemoF_Utilities.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -37,7 +37,7 @@ namespace OrmTest Console.WriteLine(string.Join("," ,list)); }); - var list2= db.Utilities.DataTableToList(db.Ado.GetDataTable("select * from [order]")); + var list2= db.Utilities.DataTableToList(db.Ado.GetDataTable("select * from `order`")); //more https://github.com/sunkaixuan/SqlSugar/wiki/f.Utilities Console.WriteLine("#### Utilities End ####"); diff --git a/Src/Asp.Net/MySqlTest/Demo/DemoG_SimpleClient.cs b/Src/Asp.Net/MySqlTest/Demo/DemoG_SimpleClient.cs index 21b7208e8..da1eea66c 100644 --- a/Src/Asp.Net/MySqlTest/Demo/DemoG_SimpleClient.cs +++ b/Src/Asp.Net/MySqlTest/Demo/DemoG_SimpleClient.cs @@ -16,7 +16,7 @@ namespace OrmTest SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/Demo/Democ_GobalFilter.cs b/Src/Asp.Net/MySqlTest/Demo/Democ_GobalFilter.cs index 2406df714..ed98445f9 100644 --- a/Src/Asp.Net/MySqlTest/Demo/Democ_GobalFilter.cs +++ b/Src/Asp.Net/MySqlTest/Demo/Democ_GobalFilter.cs @@ -16,21 +16,21 @@ namespace OrmTest var sql = db.Queryable().ToSql(); - //SELECT [Id],[Name],[Price],[CreateTime] FROM [Order] WHERE isDelete=0 + //SELECT [Id],[Name],[Price],[CreateTime] FROM `order` WHERE isDelete=0 Console.WriteLine(sql); var sql2 = db.Queryable((main,ot)=> main.Id==ot.OrderId).ToSql(); - //SELECT [Id],[Name],[Price],[CreateTime] FROM [Order] main ,[OrderDetail] ot WHERE ( [main].[Id] = [ot].[OrderId] ) AND main.isDelete=0 + //SELECT [Id],[Name],[Price],[CreateTime] FROM `order` main ,[OrderDetail] ot WHERE ( [main].[Id] = [ot].[OrderId] ) AND main.isDelete=0 Console.WriteLine(sql2); var sql3 = db.Queryable().Filter("Myfilter").ToSql();// Myfilter+Gobal - //SELECT [Id],[Name],[Price],[CreateTime] FROM [Order] WHERE Name='jack' AND isDelete=0 + //SELECT [Id],[Name],[Price],[CreateTime] FROM `order` WHERE Name='jack' AND isDelete=0 Console.WriteLine(sql3); var sql4 = db.Queryable().Filter("Myfilter",isDisabledGobalFilter:true).ToSql();//only Myfilter - //SELECT [Id],[Name],[Price],[CreateTime] FROM [Order] WHERE Name='jack' + //SELECT [Id],[Name],[Price],[CreateTime] FROM `order` WHERE Name='jack' Console.WriteLine(sql4); Console.WriteLine("#### Filter End ####"); } @@ -38,7 +38,7 @@ namespace OrmTest public static SqlSugarClient GetInstance() { - SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { DbType = DbType.SqlServer, ConnectionString = Config.ConnectionString, IsAutoCloseConnection = true }); + SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { DbType = DbType.MySql, ConnectionString = Config.ConnectionString, IsAutoCloseConnection = true }); //single table query gobal filter db.QueryFilter.Add(new SqlFilterItem() diff --git a/Src/Asp.Net/MySqlTest/UnitTest/Main.cs b/Src/Asp.Net/MySqlTest/UnitTest/Main.cs index c81b373f5..3f5d2f01c 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/Main.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/Main.cs @@ -10,7 +10,7 @@ namespace OrmTest { public static SqlSugarClient Db=> new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, diff --git a/Src/Asp.Net/MySqlTest/UnitTest/UAdo.cs b/Src/Asp.Net/MySqlTest/UnitTest/UAdo.cs index 5f3a431cb..f2578cf29 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/UAdo.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/UAdo.cs @@ -48,9 +48,9 @@ namespace OrmTest task8.Wait(); UValidate.Check(8, task8.Result[0].id, "ado"); - var task9=Db.Ado.SqlQuery("select * from [order];select * from OrderDetail"); + var task9=Db.Ado.SqlQuery("select * from `order`;select * from OrderDetail"); - var task10 = Db.Ado.SqlQueryAsync("select * from [order];select * from OrderDetail"); + var task10 = Db.Ado.SqlQueryAsync("select * from `order`;select * from OrderDetail"); task10.Wait(); } } diff --git a/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs b/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs index aa0906ec0..2731ed6d9 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs @@ -46,11 +46,11 @@ namespace OrmTest [Dc]=@Dc,[IntNull]=@IntNull WHERE [Int]=@Int", "Queryable"); sql = Db.Queryable().IgnoreColumns(it => it.CreateTime).ToSql().Key; - UValidate.Check(sql, "SELECT [Id],[Name],[Price],[CustomId] FROM [Order] ", "Queryable"); + UValidate.Check(sql, "SELECT [Id],[Name],[Price],[CustomId] FROM `order` ", "Queryable"); sql = Db.Queryable().IgnoreColumns(it => new { it.Id, it.Name }).ToSql().Key; - UValidate.Check(sql, "SELECT [Price],[CreateTime],[CustomId] FROM [Order] ", "Queryable"); + UValidate.Check(sql, "SELECT [Price],[CreateTime],[CustomId] FROM `order` ", "Queryable"); sql = Db.Queryable().IgnoreColumns("id").ToSql().Key; - UValidate.Check(sql, "SELECT [Name],[Price],[CreateTime],[CustomId] FROM [Order] ", "Queryable"); + UValidate.Check(sql, "SELECT [Name],[Price],[CreateTime],[CustomId] FROM `order` ", "Queryable"); var cts = IEnumerbleContains.Data(); var list2=Db.Queryable() diff --git a/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs b/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs index 48bf67da5..8b7068a38 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/UThread.cs @@ -12,7 +12,7 @@ namespace OrmTest public static SqlSugarClient simpleDb => new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -27,7 +27,7 @@ namespace OrmTest }); public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -43,7 +43,7 @@ namespace OrmTest }); public static SqlSugarClient singleDb = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true, @@ -58,7 +58,7 @@ namespace OrmTest }); public static SqlSugarClient singleAndSsDb = new SqlSugarClient(new ConnectionConfig() { - DbType = DbType.SqlServer, + DbType = DbType.MySql, ConnectionString = Config.ConnectionString, InitKeyType = InitKeyType.Attribute, IsAutoCloseConnection = true,