42 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace FreeSql
{
public interface ISelectFromExpression<T1>
{
ISelectFromExpression<T1> LeftJoin(Expression<Func<T1, bool>> exp);
ISelectFromExpression<T1> InnerJoin(Expression<Func<T1, bool>> exp);
ISelectFromExpression<T1> RightJoin(Expression<Func<T1, bool>> exp);
/// <summary>
/// 查询条件Where(a => a.Id > 10)支持导航对象查询Where(a => a.Author.Email == "2881099@qq.com")
/// </summary>
/// <param name="exp">lambda表达式</param>
/// <returns></returns>
ISelectFromExpression<T1> Where(Expression<Func<T1, bool>> exp);
/// <summary>
/// 查询条件Where(true, a => a.Id > 10)支导航对象查询Where(true, a => a.Author.Email == "2881099@qq.com")
/// </summary>
/// <param name="condition">true 时生效</param>
/// <param name="exp">lambda表达式</param>
/// <returns></returns>
ISelectFromExpression<T1> WhereIf(bool condition, Expression<Func<T1, bool>> exp);
/// <summary>
/// 按列排序OrderBy(a => a.Time)
/// </summary>
/// <typeparam name="TMember"></typeparam>
/// <param name="column"></param>
/// <returns></returns>
ISelectFromExpression<T1> OrderBy<TMember>(Expression<Func<T1, TMember>> column);
/// <summary>
/// 按列倒向排序OrderByDescending(a => a.Time)
/// </summary>
/// <param name="column">列</param>
/// <returns></returns>
ISelectFromExpression<T1> OrderByDescending<TMember>(Expression<Func<T1, TMember>> column);
}
}