public TResult Sum <TResult>(Expression <Func <T, TResult> > sumExpression) { SqlProvider.FormatSum(sumExpression); SetSql(); return(DbCon.ExecuteScalar <TResult>(SqlProvider.SqlString, SqlProvider.Params)); }
public bool Exists() { SqlProvider.FormatExists(); SetSql(); return(DbCon.ExecuteScalar <int>(SqlProvider.SqlString, SqlProvider.Params) == 1); }
public int Count() { SqlProvider.FormatCount(); SetSql(); return(DbCon.ExecuteScalar <int>(SqlProvider.SqlString, SqlProvider.Params)); }