When working on a fix on issue OData/lab#96 I realized that OData Client's Serializer.GetKeyString receives a DataServiceContext Object and a Concrete Dictionary instead of an IDictionary. Since Dictionary implements IDictionary, we can update the method as follows
public static string GetKeyString(DataServiceContext context, IDictionary keys)
{
// Implementation
}
Assemblies affected
Microsoft.OData.Client v7.6.2
Reproduce steps
Pass an IDictionary in the ByKey methods of OData Connected Service.
Expected result
No error is thrown
Actual result
This error is thrown: cannot convert from 'System.Collections.Generic.IDictionary' to 'System.Collections.Generic.Dictionary'
When working on a fix on issue OData/lab#96 I realized that OData Client's Serializer.GetKeyString receives a DataServiceContext Object and a Concrete Dictionary instead of an IDictionary. Since Dictionary implements IDictionary, we can update the method as follows keys)
public static string GetKeyString(DataServiceContext context, IDictionary
{
// Implementation
}
Assemblies affected
Microsoft.OData.Client v7.6.2
Reproduce steps
Pass an IDictionary in the ByKey methods of OData Connected Service.
Expected result
No error is thrown
Actual result
This error is thrown: cannot convert from 'System.Collections.Generic.IDictionary' to 'System.Collections.Generic.Dictionary'