I'm comparing Entity Framework with NHibernate, and I'd like to know if when using SQL Server, what effect (if any) would enabling or disabling MARS support have on NHibernate?
MARS = Multiple Active Result Sets
The Entity Framwork documentation states the following:
When you call the
Load
method during aforeach
(C#) orFor Each
(Visual Basic) enumeration, the Entity Framework tries to open a new data reader. This operation will fail unless you have enabled multiple active results sets by specifyingmultipleactiveresultsets=true
in the connection string. For more information, see Using Multiple Active Result Sets (MARS) on MSDN. You can also load the result of the query into a List collection, which closes the data reader and enables you to enumerate over the collection to load referenced entities.
Does NHibernate has the same issue?