Query Interceptors problem in ADO.NET Data Service

Thread is closed for posting
2 posts, 0 answers
  1. Henk
    Henk avatar
    114 posts
    Member since:
    Apr 2006

    Posted 23 Feb 2010 Link to this post


    I have a problem using Query interceptors in a ADO.NET Data Service.
    For the test I used the Silverlight integration sample application using the NorthWindOA database.
    This is the code in the Silverlight application of the query of Orders and OrderDetails using Expand:
                // Create the Service class specifying the location of the ADO.NET Data Services   
                this.context = new OADataContext(new Uri("OADataService.svc", UriKind.Relative));  
                var Orders =  
                    (from o  
                     in this.context.Orders.Expand("OrderDetails")  
                     select o  
                     ) as DataServiceQuery<Order>;  
                //use code block to perform the binding at the end of the async call  
                //casting the Customers to a LIST  
                    (ar) => this.RadGridView1.ItemsSource = Orders.EndExecute(ar).ToList(), null); 
    In the Data Service I implemented two Query interceptors for Orders and OrderDetails.
        public Expression<Func<Model.Order, bool>> OnQueryOrders()  
            return i => i.OrderID < 10255;  
        public Expression<Func<Model.OrderDetail, bool>> OnQueryOrderDetails()  
            return i => i.OrderID < 10255;  
    If I only implement the Query interceptor for Orders everything works ok.
    If I add the Query interceptor for OrderDetails I get an Error:
    System.Data.Services.Client.DataServiceQueryException was unhandled by user code  
      Message="An error occurred while processing this request." 
           at System.Data.Services.Client.QueryAsyncResult.EndExecute[TElement](Object source, IAsyncResult asyncResult)  
           at System.Data.Services.Client.DataServiceQuery`1.EndExecute(IAsyncResult asyncResult)  
           at OASilverlightTestApp.Page.<>c__DisplayClass1.<.ctor>b__0(IAsyncResult ar)  
           at System.Data.Services.Client.BaseAsyncResult.HandleCompleted()  
           at System.Data.Services.Client.QueryAsyncResult.AsyncEndRead(IAsyncResult asyncResult)  
           at System.IO.Stream.BeginRead(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state)  
           at System.Data.Services.Client.QueryAsyncResult.AsyncEndGetResponse(IAsyncResult asyncResult)  
      InnerException: System.InvalidOperationException  
           Message="An error occurred while saving changes. See the inner exception for details." 
                at System.Data.Services.Client.BaseAsyncResult.EndExecute[T](Object source, String method, IAsyncResult asyncResult)  
                at System.Data.Services.Client.QueryAsyncResult.EndExecute[TElement](Object source, IAsyncResult asyncResult)  
           InnerException: System.Data.Services.Client.DataServiceClientException  
                Message="<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\">\r\n  <code></code>\r\n  <message xml:lang=\"nl-NL\">Not Implemented</message>\r\n</error>"  
    Is this error related to OA or ADO.NET Data Services?

  2. PetarP
    PetarP avatar
    754 posts

    Posted 01 Mar 2010 Link to this post

    Hello Henk,

    We tested the behavior you described using our latest code base and everything worked fine. Since we are targeting great improvements in our LINQ implementation I believe that with the Q1 release you will not be seeing this problem. The Q1 release is scheduled for the next week.

    Best wishes,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top