I'm using the repository pattern with EF, and I think I'm pretty much sold on it but one question remains;
If I want to eager load an entity, what is the best way to do this?
For example, I have a repository mapped to an entity:
public class EFFooRepository : IFooRepository
{
public IQueryable<Foo> GetFoo()
{
.....
}
}
What if I want to get Foo and Bar objects
db.Foo.Include("Bar")
But my repository only returns Foo, so do I need to create another method GetFooAndBar?
Is there a better way?