I’m new to integrating MongoDB into the .net core project. So could you please help me to understand the next:
- 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).
- 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.