I have been facing an issue while running EF command Update-Database in Package Manager Console. Below is the error I received please help me to resolve it.
MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'tablename' already exists
By removing your previous migration that creates the table 'Student' EntityFramework now is generating the migration with a Create Table Script, if you want to remove a migration you must revert it from your database aswell. Now you can either recreate your database or revert/delete the 'Students' table on your database.
try to Run the
Add-Migration InitialCreate –IgnoreChanges
command in Package Manager Console. This creates an empty migration with the current model as a snapshot. and then Run the
Update-Database
User contributions licensed under CC BY-SA 3.0