mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-26 18:59:17 +08:00
Expression BUG
This commit is contained in:
@@ -14,7 +14,7 @@ namespace OrmTest.Demo
|
||||
public static void Init()
|
||||
{
|
||||
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
var db = GetMasterSlaveInstance();
|
||||
var list = db.Insertable(new Student() { Name="aa" }).ExecuteCommand(); // ConnectionString2 or ConnectionString3
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OrmTest.Demo
|
||||
};
|
||||
db.Insertable(a).AS("student").ExecuteCommand();
|
||||
|
||||
var list = db.Queryable<AttributeTest>().AS("student").Select(it => new AttributeTest() { Aid = it.Aid + 1 }).ToList();
|
||||
var list = db.Queryable<AttributeTest>().AS("student").Select(it => new AttributeTest() { Aid = it.Aid + 1,CreateTime=DateTime.Now,Name=it.Name }).ToList();
|
||||
}
|
||||
|
||||
public class AttributeTest
|
||||
@@ -25,7 +25,7 @@ namespace OrmTest.Demo
|
||||
public int Aid { get; set; }
|
||||
public string Name { get; set; }
|
||||
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
||||
public int CreateTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user