This commit is contained in:
610262374@qq.com
2017-03-06 14:31:15 +08:00
parent 516b2d785a
commit c24fc90871
3 changed files with 5 additions and 5 deletions

View File

@@ -34,7 +34,10 @@ namespace OrmTest.UnitTest
// .Select(it => new ViewModelStudent { Name = it.Name }).ToList();
//var list2 = db.Queryable<Student>()
// .Where(st => st.Id > 0)
// .Select("id").ToList();
// .Select("id").ToList();
var list = db.Queryable<Student, School>((st, sc) => new object[] {
JoinType.Left,st.SchoolId==sc.Id
}).Where(st => st.Id > 0).Select<Student>("*").ToList();
var list3 = db.Queryable<Student>()
.Where(st => st.Id > 0)
.Select(it => new ViewModelStudent2 { Student = it }).ToList();

View File

@@ -21,6 +21,7 @@ namespace SqlSugar
public int ParameterIndex { get; set; }
public MappingColumnList MappingColumns { get; set; }
public MappingTableList MappingTables { get; set; }
public List<JoinQueryInfo> JoinQueryInfos { get; set; }
public ResolveExpressType ResolveType { get; set; }
public Expression Expression { get; set; }
public ExpressionResult Result

View File

@@ -134,10 +134,6 @@ namespace SqlSugar
}
var joinString = joinArray[i * 2 - 2];
joinInfo.ShortName = lambdaParameters[i-1].Name;
if (mappingInfo.IsValuable())
{
mappingInfo.DbShortTaleName = joinInfo.ShortName;
}
joinInfo.JoinType = (JoinType) Enum.Parse(typeof (JoinType), joinString);
joinInfo.JoinWhere = joinArray[i * 2-1];
joinInfo.JoinIndex = i;