mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-02-27 16:50:33 +08:00
SubQuery .Sum(it=>(int)it.XX) BUG
This commit is contained in:
@@ -94,6 +94,27 @@ namespace OrmTest.Demo
|
||||
Id = SqlFunc.Subqueryable<School>().Where(s => s.Id == it.Id).Select(s => s.Id)
|
||||
}).ToList();
|
||||
|
||||
var getAll6 = db.Queryable<Student>().Select(it =>
|
||||
new
|
||||
{
|
||||
name = it.Name,
|
||||
id = SqlFunc.Subqueryable<Student>().Where(s => s.Id == it.Id).Sum(s => (int)s.SchoolId)
|
||||
}).ToList();
|
||||
|
||||
var getAll66 = db.Queryable<Student>().Select(it =>
|
||||
new
|
||||
{
|
||||
name = it.Name,
|
||||
id = SqlFunc.Subqueryable<Student>().Where(s => s.Id == it.Id).Sum(s =>s.SchoolId.Value)
|
||||
}).ToList();
|
||||
|
||||
var getAll666 = db.Queryable<Student>().Select(it =>
|
||||
new
|
||||
{
|
||||
name = it.Name,
|
||||
id = SqlFunc.Subqueryable<Student>().Where(s => s.Id == it.Id).Min(s => s.Id)
|
||||
}).ToList();
|
||||
|
||||
}
|
||||
|
||||
private static void Async()
|
||||
|
||||
Reference in New Issue
Block a user