Ejemplo n.º 1
0
        public Expression GetExpression(Object dataContext)
        {
            IQueryable    source    = GetQuerySource(dataContext);
            IEdmEntitySet entitySet = _entitySet;

            return(OeQueryContext.TranslateSource(EdmModel, dataContext, _expression, e => e == entitySet ? source : null));
        }
Ejemplo n.º 2
0
        public IQueryable ApplyTo(IQueryable source, Object dataContext)
        {
            if (_expression == null)
            {
                return(source);
            }

            _source = source;
            Expression expression = OeQueryContext.TranslateSource(EdmModel, dataContext, _expression, GetQuerySource);

            return(source.Provider.CreateQuery(expression));
        }
Ejemplo n.º 3
0
        public IQueryable ApplyTo(IQueryable source, Object dataContext)
        {
            if (_expression == null)
            {
                return(source);
            }

            IEdmEntitySet entitySet  = _entitySet;
            Expression    expression = OeQueryContext.TranslateSource(EdmModel, dataContext, _expression, e => e == entitySet ? source : null);

            return(source.Provider.CreateQuery(expression));
        }
Ejemplo n.º 4
0
        public static Expression GetExpression(IEdmModel edmModel, String query, IQueryable source)
        {
            var queryExpression = new OeQueryExpression(edmModel, query);

            return(OeQueryContext.TranslateSource(edmModel, null, queryExpression._expression, e => source));
        }