diff --git a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/2_Update.cs b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/2_Update.cs index 45666f3f7..43fabf06a 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/2_Update.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/2_Update.cs @@ -60,7 +60,7 @@ namespace OrmTest.Demo db.Updateable(updateObj).Where(true).ExecuteCommand(); //sql - db.Updateable(updateObj).Where("id=@x",new { x="1"}).ExecuteCommand(); + db.Updateable(updateObj).Where("id=@x",new { x=1}).ExecuteCommand(); db.Updateable(updateObj).Where("id","=",1).ExecuteCommand(); var t12 = db.Updateable().AS("Student").UpdateColumns(it => new School() { Name = "jack" }).Where(it => it.Id == 1).ExecuteCommandAsync(); t12.Wait(); diff --git a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/B_SharedConnection.cs b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/B_SharedConnection.cs index d774d05f2..1cbdf7a72 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/B_SharedConnection.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/B_SharedConnection.cs @@ -76,7 +76,7 @@ namespace OrmTest.Demo SqlSugarClient db = new SqlSugarClient( new ConnectionConfig() { ConnectionString = Config.ConnectionString, - DbType = DbType.SqlServer, + DbType = DbType.PostgreSQL, IsAutoCloseConnection = false, IsShardSameThread= true /*Shard Same Thread*/ }); diff --git a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/C_ExtSqlFun.cs b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/C_ExtSqlFun.cs index f0b4c0580..ee9fbb943 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/C_ExtSqlFun.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/C_ExtSqlFun.cs @@ -18,14 +18,14 @@ namespace OrmTest.Demo UniqueMethodName = "MyToString", MethodValue = (expInfo, dbType, expContext) => { - return string.Format("CAST({0} AS VARCHAR(MAX))", expInfo.Args[0].MemberName); + return string.Format("CAST({0} AS VARCHAR)", expInfo.Args[0].MemberName); } }); var config = new ConnectionConfig() { ConnectionString = Config.ConnectionString, - DbType = DbType.SqlServer, + DbType = DbType.PostgreSQL, IsAutoCloseConnection = true, ConfigureExternalServices = new ConfigureExternalServices() { diff --git a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/H_ExtEntity.cs b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/H_ExtEntity.cs index f50d5698b..ef7935802 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/H_ExtEntity.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Demos/H_ExtEntity.cs @@ -17,7 +17,7 @@ namespace OrmTest.Demo { SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, - DbType = DbType.SqlServer, + DbType = DbType.PostgreSQL, IsAutoCloseConnection = true, ConfigureExternalServices=new ConfigureExternalServices() { EntityService = (property, column) => { diff --git a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Program.cs b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Program.cs index 805b33515..f4dde87e8 100644 --- a/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Program.cs +++ b/Src/Asp.NetCore2/SqlSeverTest/PgSqlTest/Program.cs @@ -18,7 +18,7 @@ namespace OrmTest { // Demo.CodeFirst.Init(); - // Demo.Aop.Init(); + Demo.Aop.Init(); Demo.Query.Init(); Demo.Insert.Init(); Demo.Delete.Init(); @@ -26,7 +26,7 @@ namespace OrmTest Demo.MasterSlave.Init(); Demo.SharedConnection.Init(); Demo.ExtSqlFun.Init(); - Demo.QueryableView.Init(); + // Demo.QueryableView.Init(); Demo.AttributeDemo.Init(); Demo.Mapper.Init(); Demo.ExtEntity.Init();