Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I was wondering if there is any mechanism similar to Entity Framework Migration to populate a MongoDB collection?
I am trying to prepopulate a MongoDB collection with some defaults through code level rather than manually exporting and importing.

What I have tried:

I have tried to create a separate class to import data manually through the Configure function in my Startup.cs.

Thus far it just loads all the data I am trying to prepopulate but does not do checks that Entity Framework Migration does.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900