/// <summary> /// 求最大值 /// </summary> /// <typeparam name="TEntity">实体类型</typeparam> /// <param name="expression">列名表达式</param> /// <param name="columnAlias">列别名</param> /// <returns></returns> public ISqlBuilder Max <TEntity>(Expression <Func <TEntity, object> > expression, string columnAlias = null) where TEntity : class { SelectClause.Max(expression, columnAlias); return(this); }
public void TestMax_1() { _clause.Max("a"); Assert.Equal("Select Max([a])", GetSql()); }
/// <summary> /// 求最大值 /// </summary> /// <param name="column">列名</param> /// <param name="columnAlias">列别名</param> /// <returns></returns> public ISqlBuilder Max(string column, string columnAlias = null) { SelectClause.Max(column, columnAlias); return(this); }