ADO.NET Interview Questions and Answers (445) - Page 19

Which method of the SQlCommand class used to read the data from top to bottom with connected architecture environment?

NOTE: This is objective type question, Please click question title for correct answer.
What is Dapper ?

dapper is a Micro- ORM (object-relation Mapper) means does not provides all features of full ORM like LINQ-to-SQL or Entity Framework.

It works across all ADO.Net providers including Sqlite, oracle, MySQL and SQL.

It comprises of a single file (SqlMapper.cs.), which is lives on Google (code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs )

Dapper does not manage your connection's lifecycle.

You can either include the file, as is, in your project. Or install it via nuget.

Main focuses on making the materialization as fast as possible, with no overheads from things like identity managers - just "run this query and give me the typed data.
In which scenario Entity Framework provides better result ?

Select the Entity Framework when you

1) Wan to implement the Data layer.
2) Want to Require strongly typed objects.
3) Want to RA(rapid application) development.
What is Mars in ADO.NET

It was a new feature supported from ADO.NET 2.0 version.
You can have multiple SqlDataReaders open on a single connection with each sqlreader assigned to new SqlCommand

In previous versions, only one batch could be executed at a time against a single connection.
What do you mean by Projection, Eager loading, Deferred(lazy) loading, Navigating in Entity Framework?

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.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories