Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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";
like image 934
mba Avatar asked Nov 14 '25 11:11

mba


1 Answers

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.

like image 121
Richard II Avatar answered Nov 17 '25 09:11

Richard II