This commit is contained in:
skx 2020-12-05 17:14:04 +08:00
parent 7b66ade4a4
commit be6bdff169
4 changed files with 17 additions and 6 deletions

View File

@ -251,6 +251,17 @@ namespace OrmTest
db.Queryable<Order>().Where(it => it.Name.Contains("b"))
).ToList();
var query4 = db.Queryable<Order,OrderItem,Custom>(
db.Queryable<Order>().Where(it => it.Name.Contains("a")),
db.Queryable<OrderItem>().Where(it => it.CreateTime>DateTime.Now),
db.Queryable<Custom>().Where(it => it.Name.Contains("b")),
JoinType.Left, (o, i, c) => o.Id==i.OrderId,
JoinType.Left,(o,i,c)=>o.CustomId==c.Id
).Select(o=>o).ToList();
Console.WriteLine("#### Join Table End ####");
}

View File

@ -448,8 +448,8 @@ namespace SqlSugar
public virtual ISugarQueryable<T, T2 ,T3> Queryable<T, T2 ,T3>(
ISugarQueryable<T> joinQueryable1, ISugarQueryable<T2> joinQueryable2, ISugarQueryable<T3> joinQueryable3,
JoinType joinType1, Expression<Func<T, T2, bool>> joinExpression1 ,
JoinType joinType2 , Expression<Func<T, T2, bool>> joinExpression2
JoinType joinType1, Expression<Func<T, T2, T3, bool>> joinExpression1 ,
JoinType joinType2 , Expression<Func<T, T2, T3,bool>> joinExpression2
) where T : class, new() where T2 : class, new() where T3 : class, new()
{
Check.Exception(joinQueryable1.QueryBuilder.Take != null || joinQueryable1.QueryBuilder.Skip != null || joinQueryable1.QueryBuilder.OrderByValue.HasValue(), "joinQueryable1 Cannot have 'Skip' 'ToPageList' 'Take' Or 'OrderBy'");

View File

@ -104,8 +104,8 @@ namespace SqlSugar
where T2 : class, new();
ISugarQueryable<T, T2, T3> Queryable<T, T2, T3>(ISugarQueryable<T> joinQueryable1, ISugarQueryable<T2> joinQueryable2, ISugarQueryable<T3> joinQueryable3,
JoinType joinType1, Expression<Func<T, T2, bool>> joinExpression1,
JoinType joinType2, Expression<Func<T, T2, bool>> joinExpression2)
JoinType joinType1, Expression<Func<T, T2,T3, bool>> joinExpression1,
JoinType joinType2, Expression<Func<T, T2,T3, bool>> joinExpression2)
where T: class, new()
where T2 : class, new()
where T3 : class, new();

View File

@ -309,8 +309,8 @@ namespace SqlSugar
public ISugarQueryable<T, T2, T3> Queryable<T, T2,T3>(ISugarQueryable<T> joinQueryable1, ISugarQueryable<T2> joinQueryable2, ISugarQueryable<T3> joinQueryable3,
JoinType joinType1, Expression<Func<T, T2, bool>> joinExpression1,
JoinType joinType2, Expression<Func<T, T2, bool>> joinExpression2)
JoinType joinType1, Expression<Func<T, T2,T3, bool>> joinExpression1,
JoinType joinType2, Expression<Func<T, T2,T3, bool>> joinExpression2)
where T : class, new()
where T2 : class, new()
where T3 : class, new()