efcore
efcore copied to clipboard
Json/Query: translate element access of a json array
Something like:
entity.Where(x => x.JsonCollection[0].NestedReference.Name != "Foo")
When done in projection, this breaks the ordinal key logic, so we need to force AsNoTracking for these queries.
We could maybe utilize json de-duplication logic when the owner is present. For now de-dup is only working on navigation names, would need to incorporate array indexes also.
i.e.
entity.Select(x => new { x, ArrayAccess = x.JsonCollection[0] })
Same as #25701 (for Cosmos). We should think if there's some way to evolve the two together.