Hello,
You can use LINQ query to join the third table (listg
) in a similar way to how you joined the first two tables like following code.
var result = from p in listp
join a in lista on p.id equals a.id
join g in listg on p.id equals g.id
select new Combined(p.id, p.value, a.value, g.value, p.firstName.TheDefault, p.lastName.TheDefault);
As note:Please make sure all three tables (listp, lista, and listg) have the same field structure and you want to join them based on the id field.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.