, , . , LINQ to SQL, , :
from category in db.Categories
from product in category.Products
select new
{
Category = category,
Product = product
}
T-SQL, :
from category in db.Categories
join product in db.Products on category.CategoryId equals product.CategoryId
select new
{
Category = category,
Product = product
}
:
SELECT
*
FROM
Category INNER JOIN Product ON Category.CategoryId = Product.CategoryId
, .