Closed mhsimkin closed 7 years ago
This ticket: dd helper to init DB for standard scopes #25 https://github.com/IdentityServer/IdentityServer3.EntityFramework/issues/25
States that this functionality was moved to the admin code base. I searched there as well, I could not find the file.
Seed
is a method generated from EF migrations. It will be in whatever file you named you migrations. Here's ours from the sample: https://github.com/IdentityServer/IdentityServer3.Samples/blob/master/source/EntityFramework/SelfHost/Migrations/ScopeConfiguration/Configuration.cs#L16
To see if I understand your point, I need to enable migrations. That process will then generate a file that contains a seed method (Migrations/ScopeConfiguration/Configurations.cs). I would need to implement the contents of that method, as per the documentation.
Also, if you don't want to enable migrations you can derive a class from System.Data.Entity.DropCreateDatabaseAlways and then override the Seed method there to populate the db.
If you don't use migrations, then you have to come up with your own approach to seeding the DB.
Thank you.
I’m reviewing the documentation located here: https://identityserver.github.io/Documentation/docsv2/ef/migrations.html .
It mentions a seed method in the file ScopeConfiguration/Configuration.cs. Where is that file located? I can’t seem to find it in the https://github.com/IdentityServer/IdentityServer3.EntityFramework code base.
Thank you for your help.
-marc