簡體   English   中英

如何在LINQ中使用聯接表?

[英]How do I work with a join table in LINQ?

與我的LINQ進行多對多連接表掙扎:-(

我有College,Student和StudentApplications實體。

A College has many StudentApplications

A Student has many StudentApplications (for a number of different Colleges)

如何最好地讓所有已申請大學的學生?

我更喜歡使用Lambda表達式。

或者,如果您可以指向一個好的在線教程,可以幫助我自己做得更好!

EF核心錯誤

在基於答案實施(感謝)的過程中,我遇到了EF 7 / Core在此方面的錯誤。 我提出了以下問題:

https://github.com/aspnet/EntityFramework/issues/5084

students.Where(s => s.Applications.Any(a => a.College == searchCollege));

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM