ToList().Contains did not work.
Repro code from #11884
C#
var result = await db.Countries.Select(x => new CountryDTO
{
ID = x.ID,
Title = x.Title,
CountryStates = x.CountryStates.Select(y => y.State.Title).ToList()
}).Where(x => x.CountryStates.Contains("Florida")).CountAsync();
This should be fixed already. What I am doing these days!
Already working
`C#
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Where_Queryable_ToList_Contains(bool async)
{
return AssertQuery(
async,
ss => ss.Set<Customer>()
.Select(c => ss.Set<Order>().Where(o => o.CustomerID == c.CustomerID).Select(o => o.CustomerID).ToList())
.Where(e => e.Contains("ALFKI")));
}
Most helpful comment
This should be fixed already. What I am doing these days!