Skip to content

Support ContainsKey (as an analyzer is telling us to use it) #26856

@benmccallum

Description

@benmccallum

What problem are you trying to solve?
After recently upgrading to .NET 6, there's a new analyzer prompting you to convert dict.Keys.Contains("foo") to dict.ContainsKey("foo"), but that's not supported by EF Core, so a quick refactor can have nasty consequences.

Describe the solution you'd like
Can dict.ContainsKey be supported?

I could probably help out with some direction.

(didn't see any previous issues actually ask for this, sorry if it's been previously rejected)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions