- 调整 ISelect linq to sql 和 queryable 实现依赖移至 FreeSql.Extensions.Linq;#260

This commit is contained in:
28810
2020-04-10 02:28:33 +08:00
parent 98fc8baade
commit 5f98749652
21 changed files with 987 additions and 435 deletions

View File

@ -1,31 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
namespace FreeSql
{
public interface ILinqToSql<T1> where T1 : class
{
/// <summary>
/// 【linq to sql】专用方法不建议直接使用
/// </summary>
ISelect<TReturn> Select<TReturn>(Expression<Func<T1, TReturn>> select) where TReturn : class;
/// <summary>
/// 【linq to sql】专用方法不建议直接使用
/// </summary>
ISelect<TResult> Join<TInner, TKey, TResult>(ISelect<TInner> inner, Expression<Func<T1, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<T1, TInner, TResult>> resultSelector) where TInner : class where TResult : class;
/// <summary>
/// 【linq to sql】专用方法不建议直接使用
/// </summary>
ISelect<TResult> GroupJoin<TInner, TKey, TResult>(ISelect<TInner> inner, Expression<Func<T1, TKey>> outerKeySelector, Expression<Func<TInner, TKey>> innerKeySelector, Expression<Func<T1, ISelect<TInner>, TResult>> resultSelector) where TInner : class where TResult : class;
/// <summary>
/// 【linq to sql】专用方法不建议直接使用
/// </summary>
ISelect<T1> DefaultIfEmpty();
/// <summary>
/// 【linq to sql】专用方法不建议直接使用
/// </summary>
ISelect<TResult> SelectMany<TCollection, TResult>(Expression<Func<T1, ISelect<TCollection>>> collectionSelector, Expression<Func<T1, TCollection, TResult>> resultSelector) where TCollection : class where TResult : class;
}
}

View File

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace FreeSql
{
public interface ISelect<T1> : ISelect0<ISelect<T1>, T1>, ILinqToSql<T1> where T1 : class
public interface ISelect<T1> : ISelect0<ISelect<T1>, T1> where T1 : class
{
#if net40
@ -378,13 +378,5 @@ namespace FreeSql
/// <param name="sql">SQL语句</param>
/// <returns></returns>
ISelect<T1> WithSql(string sql);
/// <summary>
/// 将 ISelect&lt;T1&gt; 转换为 IQueryable&lt;T1&gt;<para></para>
/// 此方法主要用于扩展比如abp IRepository GetAll() 接口方法需要返回 IQueryable 对象<para></para>
/// 注意IQueryable 方法污染较为严重,请尽量避免此转换
/// </summary>
/// <returns></returns>
IQueryable<T1> AsQueryable();
}
}