tags:

views:

23

answers:

0

Hi everyone!

I want to convert following T-SQL query to Linq to SQL but don't know how

select
    c.CATEGORY_ID,
    c.NAME,
    c.DESCRIPTION,
    COUNT(*) as PRODUCT_COUNT
from CT_CATEGORY c
    inner join CT_CATEGORY_PRODUCT cp on c.CATEGORY_ID = cp.CATEGORY_ID
    inner join PRODUCT p on cp.PRODUCT_ID = p.PRODUCT_ID
group by
    c.CATEGORY_ID, c.NAME, c.DESCRIPTION

Thank you!