linq join用法

单条件:

var query = from person in people
join pet in pets on person equals pet.Owner
select new { OwnerName = person.FirstName, PetName = pet.Name };

多条件:

IEnumerable<string> query = from employee in employees
join student in students
on new { employee.FirstName, employee.LastName }
equals new { student.FirstName, student.LastName }
select employee.FirstName + " " + employee.LastName;

https://www.cnblogs.com/ybtools/p/6559292.html

上一篇:JDBC中的Statement 和PreparedStatement的区别?


下一篇:LeetCode Tries Prefix Tree