When I run "Add-Migration ...", new file migration files (.cs, .resx, .Designer.cs) are created. As for source control, which files should I transfer my repo and which files can I ignore?
All 3 files are needed to restore your database.
- The
.cs file contains the Up and Down methods to help you upgrade or downgrade your database, respectively. - The
.resx contains metadata used by migrations. It contains the name of the default schema (dbo is the default) and a snapshot of the model during migration creation. .Designer.cs here due to the presence of .resx . It contains properties that make it easy to access settings in a .resx file.
All 3 files should be fixed and placed in your control source, and no one should edit them.
source share