mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 07:22:57 +08:00
-
This commit is contained in:
parent
8c9c3703ee
commit
5f222f57eb
@ -16,16 +16,16 @@ namespace OrmTest
|
|||||||
/// Account have permission to create database
|
/// Account have permission to create database
|
||||||
/// 用有建库权限的数据库账号
|
/// 用有建库权限的数据库账号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ConnectionString = "PORT=5432;DATABASE=SqlSugar4xTest;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
|
public static string ConnectionString = "PORT=5433;DATABASE=SqlSugar4xTest;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Account have permission to create database
|
/// Account have permission to create database
|
||||||
/// 用有建库权限的数据库账号
|
/// 用有建库权限的数据库账号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ConnectionString2 = "PORT=5432;DATABASE=SqlSugar4xTest2;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
|
public static string ConnectionString2 = "PORT=5433;DATABASE=SqlSugar4xTest2;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Account have permission to create database
|
/// Account have permission to create database
|
||||||
/// 用有建库权限的数据库账号
|
/// 用有建库权限的数据库账号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ConnectionString3 = "PORT=5432;DATABASE=SqlSugar4xTest3;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
|
public static string ConnectionString3 = "PORT=5433;DATABASE=SqlSugar4xTest3;HOST=localhost;PASSWORD=haosql;USER ID=postgres";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,10 @@ namespace OrmTest
|
|||||||
var result71 = db.Updateable<Order>().SetColumns(it => new Order() { Name = "a", CreateTime = DateTime.Now }).Where(it => it.Id == 11).ExecuteCommand();
|
var result71 = db.Updateable<Order>().SetColumns(it => new Order() { Name = "a", CreateTime = DateTime.Now }).Where(it => it.Id == 11).ExecuteCommand();
|
||||||
//only update name
|
//only update name
|
||||||
var result8 = db.Updateable<Order>(it => it.Name == "Name").Where(it => it.Id == 1).ExecuteCommand();
|
var result8 = db.Updateable<Order>(it => it.Name == "Name").Where(it => it.Id == 1).ExecuteCommand();
|
||||||
var result81 = db.Updateable<Order>().SetColumns(it => it.Name == "Name" ).Where(it => it.Id == 1).ExecuteCommand();
|
var result81 = db.Updateable<Order>()
|
||||||
|
.SetColumns(it => it.Name == "Name" )
|
||||||
|
.SetColumns(it => it.CreateTime == DateTime.Now)
|
||||||
|
.Where(it => it.Id == 1).ExecuteCommand();
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ namespace SqlSugar
|
|||||||
if (this.Value != null)
|
if (this.Value != null)
|
||||||
this.Value = this.Value.ToString();
|
this.Value = this.Value.ToString();
|
||||||
}
|
}
|
||||||
else if (type.IsEnum())
|
else if (type!=null&&type.IsEnum())
|
||||||
{
|
{
|
||||||
this.DbType = System.Data.DbType.Int64;
|
this.DbType = System.Data.DbType.Int64;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user