Hi,
How can I seed my database using Abp.EntityFrameworkCore and Abp.Zero.EntityFrameworkCore? The startup template including module zero for .net core, shows how to seed db through entity framework 6 but I did not find any example for seeding db if I change ef6 to ef core.
Thanks, Payman
5 Answer(s)
-
0
Hi,
Currently we don't have any example or documentation for that. Have you tried implementing it just like EF6 ?
-
0
Hi,
I cannot be done like EF6 because of the changes listed in: <a class="postlink" href="http://blog.devart.com/migrating-entity-framework-6-projects-to-entity-framework-core-1-entity-framework-7.html#seeding">http://blog.devart.com/migrating-entity ... ml#seeding</a>
I have tried some ways to handle it but they are not clean.
Thanks, Payman
-
0
Hi,
Thanks for the information. I will try this and let you know if I can find something.
-
0
@paymanrowhani did you find a solution? If so, would you mind posting your solution. I am also trying to do this by using an example from //see - <a class="postlink" href="https://github.com/rowanmiller/UnicornStore">https://github.com/rowanmiller/UnicornStore</a>
but I am having trouble with the AbpDbContext throwing a NPE at CheckAndSetMayHaveTenantIdProperty
-
0
Hi,
ABP does not support Entity Framework Core but we are currently working on it and actually it is almost completed. But we are not sure when it is going to be released because we have some other tasks to do for next release.
You can get ABP from dev branch and try it with that if you like or you can wait for the next release.
Thanks.