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