What do you mean by Projection, Eager loading, Deferred(lazy) loading, Navigating in Entity Framework?

 Posted by Rasik on 5/13/2013 | Category: ADO.NET Interview questions | Views: 4533 | Points: 40

Projection :
Selecting specific properties or expressions in a query, rather than the entity being
queried. For example: from c in context.contacts select c.firstname + c.last
name, c.contactID.

Eager loading :
Requesting that related data be returned along with query results from the database.
For example: when querying contacts, eager-load their addresses. The contacts
and their addresses will be retrieved in a single query.

Deferred(Lazy) loading :
Delaying the loading of related data until you specifically request it. For example:
when working with query results for a particular contact, you can make a request
to retrieve that contact’s addresses from the database. When deferred loading happens automatically (implicitly), it is called lazy loading.

Navigating :
Moving from an entity to its related data. For example: navigate from a contact to
its addresses using the contact.Addresses property.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Rasik