locked
WCF EntityFrameworkDataService with SQL server 2016 . Odata query fails with exception at System.Data.Services.Providers.BasicExpandProvider.ExpandedEnumerator RRS feed

  • Question



  • I am using EntityFrameworkDataService in my WCF service to expose database views over odata end points. Following are the nuget packages in use

    Microsoft.Data.Edm - v5.8.1

    Microsoft.Data.Services - v5.8.1

    Microsoft.Data.Odata - v5.8.1

    Microsoft.Data.Services.Client - v5.8.1

    We have recently migrated to SQL server 2016 and one of the Odata queries is failing at

    System.Data.Services.Providers.BasicExpandProvider.ExpandedEnumerator1.get_Current()\r\n   at System.Data.Services.Serializers.EntitySerializer.WriteFeedElements(IExpandedResult expanded, QueryResultInfo elements, ResourceType expectedType, String title, Func1 getRelativeUri, Func`1 getAbsoluteUri, Boolean topLevel)\r\n at System.Data.Services.Serializers.EntitySerializer.WriteTopLevelElements(IExpandedResult expanded, QueryResultInfo elements)\r\n at System.Data.Services.Serializers.Serializer.WriteRequest(QueryResultInfo queryResults)\r\n at System.Data.Services.ResponseBodyWriter.Write(Stream stream)

    The OData query is something like this https://test.com/service/Entity1?$select=Prop1,Prop2&$expand=Entity2,Entity3&$filter=Prop4 eq 'test' and Prop5 ne ''

    There are other Odata queries which have similar expands and filter which are working fine.

    I dont know what is causing this.

    Has anyone come across this ?
    Wednesday, May 10, 2017 1:58 PM