Collection selector doesn't reference outer Depending on how the collection selector is related to the outer data source, SelectMany can translate into various different queries on the server side. In a way, it's a join but without any condition so every outer element is connected with an element from the collection source. The LINQ SelectMany operator allows you to enumerate over a collection selector for each outer element and generate tuples of values from each data source. įurther, if the key selectors are anonymous types, EF Core generates a join condition to compare equality component-wise. On photo.PersonPhotoId equals person.PhotoId So EF Core generates a join condition by comparing the outer key selector to the inner key selector for equality. While the LINQ Join has outer and inner key selectors, the database requires a single join condition. It naturally translates to INNER JOIN on relational databases. The LINQ Join operator allows you to connect two data sources based on the key selector for each source, generating a tuple of values when the key matches. You can view this article's sample on GitHub.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |