Transforming Query into Linq

Asked

Viewed 231 times

3

I need to turn this query into Linq:

select B.Nome
from Gestor A 
inner join Entidade B on A.UniaoEntidadeId = b.EntidadeId
group by B.Nome
HAVING COUNT(A.EscolaId) > 0
  • 2

    What have you tried?

1 answer

2

I can’t test it, but it must be something like this:

from g in db.Gestor
join e in db.Entidade on g.UniaoEntidadeId equals e.EntidadeId
group g by g.Nome into grpNome
where grpNome.Count() > 0
select grpNome.Key

Browser other questions tagged

You are not signed in. Login or sign up in order to post.