I have a graph of objects :
School-->Classes-->Students.
and I want to set it up in a way that I can send back school class to the client and it can access classes and students in a lazy-loading way.
is that possible ?
In brief: no.
You can either :
classes and students with your school entity) in a single call ("eager loading")or:
List<Class> GetClassesForSchool(int schoolId), List<Student> GetStudentsForClass(int classId))Lazy loading per se only works as long as your Entity Framework object context is still around to be queried for more data - which is certainly not the case when you send entities across the wire using WCF.
I don't think so, because your entity is travelling across different tiers and the one with database connection won't be accessed without your interventation from any other tier.
You'll need to tailor your own solution to do that, or just use data-transfer objects, which will have the right information nor the one that may be useless for some view.
Update: Read this article if you want to learn more about DTO pattern: