Wählen Sie eine bestimmte Entität im EF -Kern -Join aus

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Wählen Sie eine bestimmte Entität im EF -Kern -Join aus

by Anonymous » 01 Feb 2025, 09:31

Ich möchte zwei Tabellen beitreten und das Ergebnis dann in eine Liste der Elemente entität einfügen. Hier ist mein Code: < /p>

Code: Select all

List items = _dbContext.Items.Join(_dbContext.Header, l => l.HeaderId, r => r.Id, (l, r) => new { items = l, header = r })
.Where(p => string.IsNullOrEmpty(reportFilterDTO.HeaderDescription) || p.header.Description.Contains(reportFilterDTO.HeaderDescription));
Wie kann ich das Ergebnis in Elemente einfügen?

Top