Skip to content

InvalidOperationException: Sequence contains more than one matching element NET6 #215

@tomasfil

Description

@tomasfil

Hello, I am not sure if it is tied to NET6, but using .Any or Contains in queries started throwing this weird exception:
image

Reproduction code steps (any enumerable will do, no matter how it is created):

var a = new decimal[]{ 10 }.AsEnumerable();
var test =await this.Context.Set<TJobLine>().Where(x => a.Contains(x.Status.Value) && x.Valid == 1).ToListAsync();

Project version NET6
library versions 5.0.12 for EF Core and 5.21.4 oracle EF core and 3.21.4 for managed data acces core:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions