Transform Query into Linq

4

I need to transform 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
    
asked by anonymous 13.08.2015 / 20:21

1 answer

2

I can not test, but it should look 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
    
26.08.2015 / 04:37