コード例 #1
0
        public TValue Min <TValue>(System.Linq.Expressions.Expression <Func <T, object> > field)
        {
            var    parameters = CreateParamterCollection();
            string sql        = new Queryable <T>(DbReader)
                                .Min(field)
                                .OutputSqlString(parameters);

            return(DbReader.ExecuteScalar <TValue>(sql, parameters));
        }
コード例 #2
0
        public TValue Min <TValue>(Expression <Func <T, object> > field, Expression <Func <T, bool> > logical)
        {
            var    parameters = CreateParamterCollection();
            string sql        = new Queryable <T>(DbReader)
                                .Min(field)
                                .Where(logical)
                                .OutputSqlString(parameters);

            return(DbReader.ExecuteScalar <TValue>(sql, parameters));
        }
コード例 #3
0
        public TValue Sum <TValue>(System.Linq.Expressions.Expression <Func <T, object> > field, LogicalBinaryExpression logical)
        {
            var    parameters = CreateParamterCollection();
            string sql        = new Queryable <T>(DbReader)
                                .Sum(field)
                                .Where(logical)
                                .OutputSqlString(parameters);

            return(DbReader.ExecuteScalar <TValue>(sql, parameters));
        }