예제 #1
0
 public async Task <TResult> SumAsync <TResult>(Expression <Func <T, TResult> > sumExpression)
 {
     SqlProvider.FormatSum(sumExpression);
     SetSql();
     return(await DbCon.ExecuteScalarAsync <TResult>(SqlProvider.SqlString, SqlProvider.Params));
 }
예제 #2
0
 public async Task <bool> ExistsAsync()
 {
     SqlProvider.FormatExists();
     SetSql();
     return(await DbCon.ExecuteScalarAsync <int>(SqlProvider.SqlString, SqlProvider.Params) == 1);
 }
예제 #3
0
 public async Task <int> CountAsync()
 {
     SqlProvider.FormatCount();
     SetSql();
     return(await DbCon.ExecuteScalarAsync <int>(SqlProvider.SqlString, SqlProvider.Params));
 }