One context in my application is injected using Autofac. On the same database, I also have plugins that established and maintained their own contexts. Now that I've brought everything into line, the plugins will only use the primary context.
I now have a problem in that I can't do anything because the tables already exist in the database.
since it states
existing in the database already. Unable to do an
due to the fact that the plugins aren't part of the same project, remove the Up / Down entries.
I believe the main problem is that the tables already exist, thus I must update the migration entries now in place to prevent the tables from being attempted to be recreated.
I thought about rebuilding the migration file, but add migration won't work, therefore the issue would still arise.
Although it sounds absurd as I type it, I'm simply wondering whether we can instruct ef to disregard tables that already exist during the creation process. I'm not sure what else to do, and I'm not sure what code to upload that will assist.
EDIT: Possibly I should be asking how to obtain the
Gotta make a note of the other projects so I can just perform an add migration without any changes and update the migration file.
I'm not sure exactly what you mean by the "can't add-migration," however if you must perform a migration in order to create a baseline:
Add-Migration MyBaseline â€“IgnoreChanges