Esempio n. 1
0
 /// <summary>
 /// 求和
 /// </summary>
 /// <typeparam name="TEntity">实体类型</typeparam>
 /// <param name="expression">列名表达式</param>
 /// <param name="columnAlias">列别名</param>
 /// <returns></returns>
 public ISqlBuilder Sum <TEntity>(Expression <Func <TEntity, object> > expression, string columnAlias = null) where TEntity : class
 {
     SelectClause.Sum(expression, columnAlias);
     return(this);
 }
Esempio n. 2
0
 public void TestSum_1()
 {
     _clause.Sum("a");
     Assert.Equal("Select Sum([a])", GetSql());
 }
Esempio n. 3
0
 /// <summary>
 /// 求和
 /// </summary>
 /// <param name="column">列名</param>
 /// <param name="columnAlias">列别名</param>
 /// <returns></returns>
 public ISqlBuilder Sum(string column, string columnAlias = null)
 {
     SelectClause.Sum(column, columnAlias);
     return(this);
 }