mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-08 10:24:55 +08:00
-
This commit is contained in:
12
SqlSugar/Abstract/QueryableProvider/QueryableExtendsions.cs
Normal file
12
SqlSugar/Abstract/QueryableProvider/QueryableExtendsions.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace SqlSugar
|
||||||
|
{
|
||||||
|
public class QueryableExtendsions
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -293,40 +293,5 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISugarQueryable<T> JoinTable<T2>(Expression<Func<T, T2, object>> expression, JoinType type = JoinType.Left)
|
|
||||||
{
|
|
||||||
var sqlBuilder = this.Context.SqlBuilder;
|
|
||||||
var items = sqlBuilder.LambadaQueryBuilder;
|
|
||||||
items.WhereIndex = items.WhereIndex + 100;
|
|
||||||
items.ResolveType = ResolveExpressType.WhereMultiple;
|
|
||||||
ResolveExpress re = new ResolveExpress();
|
|
||||||
re.Context = this.Context;
|
|
||||||
var exLeftArray = re.GetLeftArray(expression);
|
|
||||||
re.ResolveExpression(expression);
|
|
||||||
JoinQueryInfo joinInfo = new JoinQueryInfo()
|
|
||||||
{
|
|
||||||
JoinType = type,
|
|
||||||
JoinIndex = items.JoinIndex,
|
|
||||||
JoinWhere = re.SqlWhere,
|
|
||||||
PreShortName= exLeftArray.First(),
|
|
||||||
ShortName= exLeftArray.Last(),
|
|
||||||
TableName=sqlBuilder.GetTranslationTableName(typeof(T2).Name)
|
|
||||||
};
|
|
||||||
items.JoinIndex++;
|
|
||||||
items.JoinQueryInfos.Add(joinInfo);
|
|
||||||
base.AddPars(re.Paras,this.Context);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ISugarQueryable<T> JoinTable<T2, T3>(Expression<Func<T, T2, T3, object>> expression, JoinType type = JoinType.Left)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ISugarQueryable<T> JoinTable(string tableName, string shortName, string onWhere, object whereObj, JoinType type = JoinType.Left)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ namespace SqlSugar
|
|||||||
List<T> ToPageList(int pageIndex, int pageSize);
|
List<T> ToPageList(int pageIndex, int pageSize);
|
||||||
List<T> ToPageList(int pageIndex, int pageSize, ref int pageCount);
|
List<T> ToPageList(int pageIndex, int pageSize, ref int pageCount);
|
||||||
|
|
||||||
ISugarQueryable<T> JoinTable<T2>(Expression<Func<T, T2, object>> expression, JoinType type = JoinType.Left);
|
|
||||||
ISugarQueryable<T> JoinTable<T2, T3>(Expression<Func<T, T2, T3, object>> expression, JoinType type = JoinType.Left);
|
|
||||||
ISugarQueryable<T> JoinTable(string tableName, string shortName, string onWhere, object whereObj, JoinType type = JoinType.Left);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Clear();
|
void Clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
<Compile Include="Abstract\DbProvider\DbProvider.cs" />
|
<Compile Include="Abstract\DbProvider\DbProvider.cs" />
|
||||||
<Compile Include="Abstract\DbProvider\SugarMappingAttribute.cs" />
|
<Compile Include="Abstract\DbProvider\SugarMappingAttribute.cs" />
|
||||||
<Compile Include="Abstract\QueryableProvider\QueryableAccessory.cs" />
|
<Compile Include="Abstract\QueryableProvider\QueryableAccessory.cs" />
|
||||||
|
<Compile Include="Abstract\QueryableProvider\QueryableExtendsions.cs" />
|
||||||
<Compile Include="Abstract\QueryableProvider\QueryableProvider.cs" />
|
<Compile Include="Abstract\QueryableProvider\QueryableProvider.cs" />
|
||||||
<Compile Include="Abstract\SqlableProvider.cs" />
|
<Compile Include="Abstract\SqlableProvider.cs" />
|
||||||
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\DeleteBuilder.cs" />
|
<Compile Include="Abstract\SqlBuilderProvider\DMLBuilder\DeleteBuilder.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user