mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
-
This commit is contained in:
parent
d0c1946750
commit
b58a99eeeb
@ -8,5 +8,10 @@ namespace OrmTest.Models
|
||||
{
|
||||
public class ViewModelStudent:Student
|
||||
{
|
||||
|
||||
}
|
||||
public class ViewModelStudent2
|
||||
{
|
||||
public Student Student { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -32,9 +32,12 @@ namespace OrmTest.UnitTest
|
||||
//var list = db.Queryable<Student>()
|
||||
// .Where(st => st.Id > 0)
|
||||
// .Select(it => new ViewModelStudent { Name = it.Name }).ToList();
|
||||
var list2 = db.Queryable<Student>()
|
||||
//var list2 = db.Queryable<Student>()
|
||||
// .Where(st => st.Id > 0)
|
||||
// .Select("id").ToList();
|
||||
var list3 = db.Queryable<Student>()
|
||||
.Where(st => st.Id > 0)
|
||||
.Select("id").ToList();
|
||||
.Select(it => new ViewModelStudent2 { Student = it }).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,10 @@ namespace SqlSugar
|
||||
base.Context.Result.CurrentParameter = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(item.GetType().IsClass&& item.GetType()!=ExpressionConst.StringType)
|
||||
{
|
||||
|
||||
}else{
|
||||
Check.ThrowNotSupportedException(item.GetType().Name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user