mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Add unit test
This commit is contained in:
@@ -71,8 +71,21 @@ namespace OrmTest
|
|||||||
})
|
})
|
||||||
.Where(it => it.Id == 1)
|
.Where(it => it.Id == 1)
|
||||||
.ExecuteCommand();
|
.ExecuteCommand();
|
||||||
|
db.CodeFirst.InitTables<UnitViewOrder2>();
|
||||||
|
var query51 = db.Queryable<Order> ()
|
||||||
|
.InnerJoin<Custom>((o, cus) => o.CustomId == cus.Id)
|
||||||
|
.Where((o) => o.Id <10)
|
||||||
|
.Select((o, cus) => new UnitViewOrder2 { xxx=o.Name, yyyy= o.CreateTime})
|
||||||
|
.IntoTable<UnitViewOrder2>();
|
||||||
}
|
}
|
||||||
|
public class UnitViewOrder2
|
||||||
|
{
|
||||||
|
[SugarColumn(ColumnName = "name")]
|
||||||
|
public string xxx { get; set; }
|
||||||
|
|
||||||
|
[SugarColumn(ColumnName = "createtime")]
|
||||||
|
public DateTime yyyy { get; set; }
|
||||||
|
}
|
||||||
public class UnitTesdfa
|
public class UnitTesdfa
|
||||||
{
|
{
|
||||||
[SugarColumn(ColumnName = "iiid")]
|
[SugarColumn(ColumnName = "iiid")]
|
||||||
|
Reference in New Issue
Block a user