NHibernate internal data-retrieval method
Internally, does NHibernate use DataSets or SqlDataReaders to acce开发者_Go百科ss data from sql server or does it depend?
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.
精彩评论