InterviewSolution
| 1. |
What Is Lazy Loading In Entity Framework? |
|
Answer» Lazy loading is the concept of loading the data only when we REQUIRED. We can say it loading on demand. Suppose you have a Department object there you have Employee object ALSO and there is 1 to many relation between Departments to Employee. But when you fetch the records of department it won't load the Employee object but the tome when you are doing the foreach on Department object Employee object not loaded but once you will do the ITERATION for Employee object than only the Employee object will load. Lazy loading is the concept of loading the data only when we required. We can say it loading on demand. Suppose you have a Department object there you have Employee object also and there is 1 to many relation between Departments to Employee. But when you fetch the records of department it won't load the Employee object but the tome when you are doing the foreach on Department object Employee object not loaded but once you will do the iteration for Employee object than only the Employee object will load. |
|