Seed the database with model data on EnsureCreated

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Data can be added to the model in OnModelCreating or similar which, on other providers, including Cosmos, will then be inserted into the database when EnsureCreated is called. We should consider doing the same.

      Model data is generally frowned on by the EF Team--it's something we wished we hadn't built. But that is because of the way it interacts with migrations. I can't think of any similar issues in the document case. However, we do need to be clear how EnsureCreated is intended to be used with MongoDB.

              Assignee:
              Unassigned
              Reporter:
              Arthur Vickers
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: