I want to perform left join using two or more table in Linq to Sql query but it looks like there is no keyword for doing so in C#. Is there any way to perform left join in the same way we do inner joins using Linq to Sql?
public IQueryable GetProducts(int productID)
{
var products =
from p in this.Products
left join c in this.ProductCategoryProducts
on p.CategoryID equals c.ProductCategoryID
left join ac in this.ProductCategories
on c.ProductCategoryID equals ac.ProductCategoryID
where p.ProductID == productID
select new
{
ProductID = a.ProductID,
Heading = p.Heading,
Category = ac.ProductCategory
};
return products ;
}