Source code can be found at https://github.com/benjaminsqlserver/AddCourseMgtMicroservice
Steps
- We are going to start by creating a yaml file to describe the Course Management Microservice.
- I am going to save the yaml file for the Course Management Microservice in the same folder where I saved the yaml file for the Student Management Microservice
- I am now going to get the full object name of the yaml file for Course Management Microservice. I will copy the full object name.
- I will now paste that full object name into an empty Sublime Text file.
- I will add the craftsman add bc command
- I will now open the folder where the Visual Studio solution file is. I will run the command I formulated in step 5 there.
- I will now open the updated Visual Studio Solution.
- I will now go to Solution Explorer
- I will set CourseManagement as startup project in Solution Explorer
- I will now update database connection string in appsetting.development.json file of CourseManagement Microservice to point to the default instance of SQL SERVER on my PC.
- I will now open Package Manager Console
- Please ensure your default project is set to Course Management in Package Manager Console
- Type the command Add-Migration GenerateDb and press Enter.
- Let us take some time to examine generated migration file.
- Let us now update the database
- Let us run the Course Management Microservice for the first time
- Thank you for watching.
Top comments (0)