Question

I have this query

this.FixturePartidoPuntaje.Load();     

var partidos = from q in this.FixturePartidoPuntaje
               where ( q.FixturePartido.Equipo.EquipoId.Equals(equipoId) ||
                      q.FixturePartido.Equipo1.EquipoId.Equals(equipoId)) &&
                      q.puntaje > 0
               select q;

The most important here is that this is a Jugador Entity.

How do I load the FixturePartido and ius children?

Thanks

Was it helpful?

Solution

Use the .Include() command:

var partidos = from q in this.FixturePartidoPuntaje.Include("children")
               where (q.FixturePartido.Equipo.EquipoId.Equals(equipoId) ||
                      q.FixturePartido.Equipo1.EquipoId.Equals(equipoId)) &&
                      q.puntaje > 0
               select q;

"children" here is the name of the Navigational Property that you want to include, if my memory isn't way off...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top