I have the following entities:
public class Company
{
public string CompanyName { get; set; }
public int ID { get; set; }
}
public c
You need to either apply the filter before the join
:
join cc in CompanyCurrency.Where(e => e.CompanyId == 1)
or as part of the join
on new { CurrencyId = c.ID, CompanyId = 1 } equals new { cc.CurrencyId, cc.CompanyId }
For inner join
s it doesn't really matter, but for outer join
it's important (the same btw applies to SQL queries).