select a.* from Atleta a
inner join AtletiGare ag on ag.AtletaId=a.AtletaId
where ag.Pettorale=10
public class Atleta
{
[Required]
[Key]
public int AtletaId { get; set; }
public ICollection<AtletiGare> AtletiGare { get; set; }
}
public class AtletiGare
{
[Required]
[Key]
public int AtletiGareId { get; set; }
[Required]
public int AtletaId { get; set; }
public Atleta Atleta { get; set; }
public int Pettorale { get; set; }
}
IList<Atleta> atletaList = new List<Atleta>();
i need all atleta filtered by atletigare.pettorale==10
but
i'll try include the collection(_context.Atleta.Include(x => x.AtletiGare))
in atleta the collection of atletiGare in is not filter