DEV Community

Benjamin Fadina
Benjamin Fadina

Posted on

LESSON 6: CREATION OF ALL LAYERS OF COURSE MANAGEMENT MICROSERVICE USING WRAPT

Source code can be found at https://github.com/benjaminsqlserver/AddCourseMgtMicroservice
Steps

  1. We are going to start by creating a yaml file to describe the Course Management Microservice.
  2. 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
  3. 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.
  4. I will now paste that full object name into an empty Sublime Text file.
  5. I will add the craftsman add bc command
  6. I will now open the folder where the Visual Studio solution file is. I will run the command I formulated in step 5 there.
  7. I will now open the updated Visual Studio Solution.
  8. I will now go to Solution Explorer
  9. I will set CourseManagement as startup project in Solution Explorer
  10. 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.
  11. I will now open Package Manager Console
  12. Please ensure your default project is set to Course Management in Package Manager Console
  13. Type the command Add-Migration GenerateDb and press Enter.
  14. Let us take some time to examine generated migration file.
  15. Let us now update the database
  16. Let us run the Course Management Microservice for the first time
  17. Thank you for watching.

Top comments (0)