I have a model class with lazy loading on. Until now I always used lazy loading, for example loading a single student with a collection of his courses.
If I want to load all the courses with the collection of all students who are enrolled, can I use the Include() method of eager loading on a property with lazy loading on? Are there any side effects?
[ForeignKey("Id")]
public virtual ICollection<Students> Students { get; set; }
public IQueryable<Students> GetCoursesWithAllStudents()
{
return db.Courses.Include(c => c.Students);
}