I have an entity model:
class Test
{
public virtual Address Address { get; set; }
}
class Address
{
public virtual Town Town { get; set; }
}
Is there a way to eager load without using .Include
.
The solution might look like this:
class Test
{
[EagerLoad]
public virtual Address Address { get; set; }
}
class Address
{
[EagerLoad]
public virtual Town Town { get; set; }
}
This solves the problem of having to include Include
on every method that retrieves a Test... It will always need its address included.