Include and Where predicate cause left join instead of inner join
问题 With the following table structure (extraneous columns removed) create table [Events] ( ID int not null identity, Name nvarchar(128) not null, constraint PK_Events primary key(ID) ) create table [Donations] ( ID int not null identity, EventID int not null, Amount decimal(10, 2) not null, constraint PK_Donations primary key(ID), constraint FK_Donations_Events foreign key(EventID) references [Events](ID) on update no action on delete no action ) I use the following Linq-to-Entities queries: //