I have a many-to-many between 'Edital' and 'Graduando' and I created a entity called 'EditalGraduando'. Now I want to know every 'edital' that 'graduando' subscribe using the graduando id. So I did this:
public IQueryable<int> GetGraduandosIds(int editalId)
{
var graduandosId = db.EditalGraduandoe.Where(e => e.EditalId == editalId).Select(i => i.graduandoID);
return graduandosId;
}
There's a way to do a select in the entety 'Graduando' using this result? Like this: SQL WHERE ID IN (id1, id2, ..., idn)