mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Add unit test
This commit is contained in:
parent
f58edda7bc
commit
29b8d3bb6e
@ -77,9 +77,23 @@ namespace OrmTest
|
||||
.Where((o) => o.Id <10)
|
||||
.Select((o, cus) => new UnitViewOrder2 { xxx=o.Name, yyyy= o.CreateTime})
|
||||
.IntoTable<UnitViewOrder2>();
|
||||
db.CodeFirst.InitTables<UnitViewOrder3>();
|
||||
db.DbMaintenance.TruncateTable<UnitViewOrder3>();
|
||||
var query52 = db.Queryable<Order>()
|
||||
.InnerJoin<Custom>((o, cus) => o.CustomId == cus.Id)
|
||||
.Where((o) => o.Id < 10)
|
||||
.Select((o, cus) => new UnitViewOrder3 { yyyy=o.CreateTime },true)
|
||||
.IntoTable<UnitViewOrder3>();
|
||||
|
||||
db.Queryable<Order>().Take(10).IgnoreColumns(it=>it.Id).IntoTable<Order>();
|
||||
}
|
||||
public class UnitViewOrder3
|
||||
{
|
||||
[SugarColumn(ColumnName = "Name1")]
|
||||
public string Name { get; set; }
|
||||
|
||||
public DateTime yyyy { get; set; }
|
||||
}
|
||||
public class UnitViewOrder2
|
||||
{
|
||||
[SugarColumn(ColumnName = "name")]
|
||||
|
Loading…
Reference in New Issue
Block a user