예제 #1
0
 public OeQueryExpression(IEdmModel edmModel, IEdmEntitySet entitySet, Expression expression, OeEntryFactory?entryFactory = null)
 {
     EdmModel     = edmModel;
     _entitySet   = entitySet;
     _expression  = OeEnumerableToQuerableVisitor.Translate(expression);
     EntryFactory = entryFactory;
 }
예제 #2
0
        public OeQueryExpression(IEdmModel edmModel, String query)
        {
            EdmModel = edmModel;

            ODataUri odataUri = OeParser.ParseUri(edmModel, new Uri(query, UriKind.Relative));

            _entitySet = ((EntitySetSegment)odataUri.Path.FirstSegment).EntitySet;

            var        queryContext = new OeQueryContext(edmModel, odataUri);
            Expression expression   = queryContext.CreateExpression(out _);

            _expression = OeEnumerableToQuerableVisitor.Translate(expression);

            EntryFactory = queryContext.EntryFactory;
        }