Linq Query with aggregate function

Posted by Billy Logan on Stack Overflow See other posts from Stack Overflow or by Billy Logan
Published on 2010-05-29T12:49:50Z Indexed on 2010/05/29 12:52 UTC
Read the original article Hit count: 344

Filed under:
|

Hello everyone, I am trying to figure out how to go about writing a linq query to perform an aggregate like the sql query below:

select d.ID, d.FIRST_NAME, d.LAST_NAME, count(s.id) as design_count
from tbldesigner d inner join
TBLDESIGN s on d.ID = s.DESIGNER_ID
where s.COMPLETED = 1 and d.ACTIVE = 1
group by d.ID, d.FIRST_NAME, d.LAST_NAME
Having COUNT(s.id) > 0

If this is even possible with a linq query could somebody please provide me with an example. Thanks in Advance, Billy

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about linq-to-entities