mba
mba

Reputation: 319

Localdb with the Configuration " MultipleActiveResultSets = True"

Can anyone tell me if it is possible to enable the MultipleActiveResultSets = True command on the sql server localdb.

I'm having problems with DataReader opened in the same method, even closing the connection.

My connection string: caminho =

$"Data Source = (LocalDB)\\v11.0; AttachDbFilename = { MDF}; Integrated Security = True; MultipleActiveResultSets=True";

Upvotes: 4

Views: 793

Answers (1)

Richard II
Richard II

Reputation: 871

Yes, it's possible. We use LocalDB with MultipleActiveResultSets (MARS) enabled in our application at dozens of sites, both test and production. In fact, we found it absolutely necessary to enable MARS in order to successfully use Entity Framework.

Upvotes: 2

Related Questions