The issue for this is a mismatch between DataContextModelSnapshot file and your entity classes. Usually this happen due to merge conflicts in the DataContextModelSnapshot file.
It’s very hard to find the mismatch just by going through the history of the DataContextModelSnapshot file. Therefore the easiest solution for this is to;
- Delete the Snapshot file.
- Run Add-Migration ‘Migration_Name’ (This is going to create the snapshot file from the scratch and also create a new Migration file).
- Delete the Newly Created Migration file manually.
- Now you can start adding Add-Migration for the new changes.
CLICK HERE to find out more related problems solutions.