views:

32

answers:

1

Internally, does NHibernate use DataSets or SqlDataReaders to access data from sql server or does it depend?

+2  A: 

It uses neither, actually. What it uses is an "abstract" IDataReader, for which there are several platform-dependent implementations. For SQL Server it does use SqlDataReader, yes.

In NHibernate, there's a notion of an IDriver, which provides and abstraction for core NHibernate code and is responsible for creation of platform-specific instances of IDbConnection and IDbCommand objects.

Anton Gogolev
Well, this abstract IDbDataReader will contain a SqlDataReader when NHibernate accesses a SQL Server DB. (This is what Mr Grok asked ' ... to access data from sql server ...')
Frederik Gheysels
Good, I just didn't want to see it use datasets etc in the background because they're too slow for asp.net dev for me. And it doesn't - excellent... Thanks.
Mr Grok