Dot-net Core project 3.1 and migrations for database Mongo DB


I’m new to integrating MongoDB into the .net core project. So could you please help me to understand the next:

  1. Can I create model classes that represent the collection document’s structure firstly and then run migrations, so the MongoDB database will be created from scratch automatically with a predefined structure? If yes, could you please advise how to do it?
    (Currently, I’m working with PostgreSQL and use migrations).
  2. I need to host this database on the AWS, so I have to set up Atlas environment for this database firstly and create MongoDB there manually, or I can just set up migrations and when I deploy the project, the database will be created automatically?
    Is the setup of Atlas env. is compulsory?

I appreciate all your help and pieces of advice.

For that, I suggest that you start by taking M220N course from MongoDB University as some core (pun intented) concepts are covered.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.