Skip to content

Allow Microsoft.OData.Client.Serializer.GetKeyString to receive an IDictionary Object #1643

Description

@KenitoInc

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

clientonly related to OData.Client

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions