Hi,
I've tried to upgrade to 4.1 with mixed succes. After digging around i discovered that the latest version of EFCore does not support TPH(Table per heneritance). Wich is a problem for me cause i use that quite often in my database design.
So I'm thinking why not just roll back to EF6. But how do i best tackle that? Let's say i download a blank ASPNet Zero solution V4.1.
How would you guys change the EntityFrameworkCore project to EF6?
Thx for you advice.
4 Answer(s)
-
0
Hi,
If you look at here <a class="postlink" href="https://github.com/aspnet/EntityFramework/wiki/Roadmap#ef-core-10-released">https://github.com/aspnet/EntityFramewo ... 0-released</a>, TPH is supported but maybe you have a special need.
We have made below changes in DB when moving to EF Core. So, after removing EF Core references and adding back to EF 6.x references, then you can revert below changes in your DB.
New Tables AbpRoleClaims AbpUserTokens __EFMigrationsHistory
Changed Tables AbpUsers NormalizedEmailAddress: UPPER case of EmailAddress. NormalizedUserName: UPPER case of UserName. ConcurrencyStamp AbpRoles NormalizedName: UPPER case of Name. ConcurrencyStamp
Deleted Tables __MigrationHistory
Thanks.
-
0
Yeah, i don't know why i said TPH but i mean TPT. Anyway Thx for the tip. I'll try your suggestion.
-
0
-
0
Hi,
For EF 6 it is different. You need to use a configuration class like this <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.EntityFramework/Migrations/Configuration.cs">https://github.com/aspnetzero/aspnet-ze ... uration.cs</a>.
You can check our github repository for this.
Thanks.