- 增加 ISelect OrderByIf 方法 #446;

This commit is contained in:
28810
2020-09-02 18:44:22 +08:00
parent 9e9891ded4
commit d025603997
3 changed files with 197 additions and 189 deletions

View File

@ -160,6 +160,8 @@ namespace FreeSql.Internal.CommonProvider
_tables[0].Parameter = column.Parameters[0];
return this.InternalOrderByDescending(column.Body);
}
public ISelect<T1> OrderByIf<TMember>(bool condition, Expression<Func<T1, TMember>> column, bool descending = false) =>
descending ? this.OrderByDescending(condition, column) : this.OrderBy(condition, column);
public decimal Sum<TMember>(Expression<Func<T1, TMember>> column)
{