Aanmaken, opvolgen en werken met data rond sollicitaties.
- NPM Task Runner for VS2015+ https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner
- Please check that these settings apply: https://blogs.msdn.microsoft.com/webdev/2015/03/19/customize-external-web-tools-in-visual-studio-2015/
- Git Clone & Open Visual Studio
- Go to "Advanced System Settings" > "Environment Variables" in Windows and set (or create) the following environment variables accordingly:
- "SOLLICITATIEBEHEER_ConnectionStrings:Sollicitatiebeheer" to the value that corresponds to your environment
Tip: you can also use thesetx
command:
or open the cmd prompt as an adinministrator you and att the>setx SOLLICITATIEBEHEER_ConnectionStrings:Sollicitatiebeheer "Your value" SUCCESS: Specified value was saved.
/M
switch:OR alternatively read more info at https://andrewlock.net/how-to-set-the-hosting-environment-in-asp-net-core/>setx SOLLICITATIEBEHEER_ConnectionStrings:Sollicitatiebeheer "Your value" /M SUCCESS: Specified value was saved.
- "SOLLICITATIEBEHEER_ConnectionStrings:Sollicitatiebeheer" to the value that corresponds to your environment
- Restart the application pool, or restart Visual Studio when developping with IISExpress (or another webserver), so it can consume the newly set environment variables.
- Open a command prompt at the location of the ´Sollicitatiebeheer.Data.EFCore´ project 'see: https://github.com/aredfox/Sollicitatiebeheer/tree/master/Source/Backend/Sollicitatiebeheer.Data.EFCore). There you'll find several .BAT files which facilitate the migrations cycle and workarounds needed for EFCore 1.1.
- AddMigration.BAT + migrationName will add a new migration with the given name.
- RemoveMigration.BAT will remove the last migration you added.
- UpdateDatabase.BAT will update your database to the latest version.
- SeedDatabase.BAT will seed your database with dummy data if no data is present yet.
- See Program.cs, which includes the logic for seeding, which you can extend whenever your model changes: https://github.com/aredfox/Sollicitatiebeheer/blob/master/Source/Backend/Sollicitatiebeheer.Data.EFCore.MigrationsHelpApp/Program.cs.
- ResetMigrations.bat will remove all migrations, initiaite a new migration with name 'InitialCreate', drop the database and create + seed a new one.