This article is a mirror article of machine translation, please click here to jump to the original article.

View: 23534|Reply: 1

[Source] Use lambda expressions in Linq to Entity to implement Left Join and Join

[Copy link]
Posted on 6/13/2018 5:04:14 PM | | |
1. Read the left connection of the two tables of the user and the department:


Note: The user information used and the corresponding department information will be returned above (i.e. the user department ID information is missing, then the user list will also be displayed)



2. Read the left connection information of the specified return list field:




3. Read the connection table:


Note: Only the information equal to the DepartmentId in the user and the DepartmentId in the department table will be displayed here, if the user does not have a department ID, this user information will not be displayed







Previous:ef (lambda expression) queries several exceptions encountered in the data
Next:windows Apache ab web site stress test
Posted on 6/14/2018 9:40:06 AM |
Note that adding DefaultIfEmtyp() is the Left join, if you don't add this, it's still an Inner Join
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com