Open chancie86 opened 6 years ago
I get the same error for the same odata service when executing the following code
IEnumerable<Person> data = await client.For<Person>()
.FindEntriesAsync();
The strange in error is why call System.Linq.Enumerable.SingleOrDefault
Any response?
Unfortunately I haven't had the time to look into this issue. I am very busy with other project, which makes it hard to find time to investigate and resolve issues reported lately.
When pointing the client to the v4 example on odata.org you get an InvalidOperationException:
https://services.odata.org/TripPinRESTierService/People
System.InvalidOperationException: Sequence contains more than one matching element at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerableb__37_0(String x)
at System.Collections.Concurrent.ConcurrentDictionaryd__3.MoveNext()
1 source, Func
2 predicate) at Simple.OData.Client.V4.Adapter.Metadata.TryGetEntityType(String collectionName, IEdmEntityType& entityType) at Simple.OData.Client.V4.Adapter.Metadata.IsTypeWithId(String collectionName) at Simple.OData.Client.Adapter.MetadataCache.2.GetOrAdd(TKey key, Func
2 valueFactory) at Simple.OData.Client.Adapter.MetadataCache.IsTypeWithId(String typeName) at Simple.OData.Client.V4.Adapter.ResponseReader.CreateAnnotations(ODataResource odataEntry) at Simple.OData.Client.V4.Adapter.ResponseReader.ConvertEntry(ResponseNode entryNode, Object entry) at Simple.OData.Client.ResponseReaderBase.EndEntry(Stack`1 nodeStack, ResponseNode& rootNode, Object entry) at Simple.OData.Client.V4.Adapter.ResponseReader.ReadResponse(ODataReader odataReader) at Simple.OData.Client.V4.Adapter.ResponseReader.