Reputation: 319
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
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