mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Add user test case
This commit is contained in:
parent
909c4611de
commit
6cf6336e45
@ -96,6 +96,27 @@ namespace OrmTest
|
||||
|
||||
|
||||
var qu4 = Db.Queryable<Order>().OrderBy(it=>it.Id+it.Id).ToList();
|
||||
|
||||
var qu5 = Db.Queryable<ORDER>().GroupBy(x=>x.CustomId).Select(it => new
|
||||
{
|
||||
x=SqlFunc.AggregateSum(SqlFunc.IIF(it.CustomId.HasValue,1,2))
|
||||
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public class ORDER
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public int? CustomId { get; set; }
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<OrderItem> Items { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user