entity framework 6.1 - Replace DbProviderServices in DbMigrationsConfiguration? -


in ef6.1.3 trying replace current dbproviderservice new provider service. in dbconfiguration works adding code loaded event:

loaded += (sender, args) =>                 args.replaceservice<dbproviderservices>(                 (s, _) => new someproviderservices(s, myhandler)); 

if try in dbmigrationsconfiguration constructor

dbconfiguration.loaded += (sender, args) =>                 args.replaceservice<dbproviderservices>(                 (s, _) => new someproviderservices(s, myhandler)); 

i exception stating ef has been loaded , cannot change loaded event handler now.

what should course of actions in situation? thanks.

there actions take. instance have modified web config:

<entityframework codeconfigurationtype="mynamespace.assembly1.myconfigurationclass, mynamespace.assembly1, version=1.0.0.0, culture=neutral, publickeytoken=b254a7d323adadef"> 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -