Two DbContexts with corresponding DataInitializers - "ORA-00955: name is already used by an existing object
Posted: Mon 20 Oct 2014 22:16
Hello,
I'm using dotConnect for Oracle, EF6, and CodeFirst approach with two DbContexts, each one with its own DatabaseInitializer.
With the startup of the app, both DatabaseInitializers are fired, but with the second one, I always get an error, and data of this initializer is not inserted in the database, neither the corresponding registry in table '__MigrationHistory':
The error I get is:
If I remove recently created table '__MigrationHistory', and I force a request to the app so the second DatabaseInitializer is fired again, the initilization works well.
My question is: Is it posible to use Code Fist approach with more than one DbContext with corresponding DatabaseInitializer?
Thanks,
Borja
I'm using dotConnect for Oracle, EF6, and CodeFirst approach with two DbContexts, each one with its own DatabaseInitializer.
With the startup of the app, both DatabaseInitializers are fired, but with the second one, I always get an error, and data of this initializer is not inserted in the database, neither the corresponding registry in table '__MigrationHistory':
The error I get is:
Code: Select all
"ORA-00955: name is already used by an existing object"
My question is: Is it posible to use Code Fist approach with more than one DbContext with corresponding DatabaseInitializer?
Thanks,
Borja