Answers for "join equals in LINQ"

SQL
1

c# left join linq

var query = from person in people
                join pet in pets on person equals pet.Owner into gj
                from subpet in gj.DefaultIfEmpty()
                select new { person.FirstName, PetName = subpet?.Name ?? String.Empty };
Posted by: Guest on February-10-2021
2

linq join

var id = 1;
var query =
   from post in database.Posts
   join meta in database.Post_Metas on post.ID equals meta.Post_ID
   where post.ID == id
   select new { Post = post, Meta = meta };
Posted by: Guest on April-08-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language