The type of one of the expressions in the join clause is incorrect in Entity Framework. Constant in left join
问题 I'm trying to do a left join in an EF query. I'm getting the following error: Error CS1941 The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'GroupJoin' and here is the C# code: var foo = from m in db.ClientMasters join a in db.Orders on new { m.Id, Status = "N" } equals new { a.ClientID, a.Status } into a_join from a in a_join.DefaultIfEmpty() select new { m.ClientID, a.ID }; 回答1: I'm an idiot. The column names have to match in the join.