I'm using asp.net zero build on boilerplate and I want to extend my table of feature, but I couldn't access feature table like other normal tables which I've created. Can anyone help?
I was facing your problem with another table AuditLogs
, and I finally managed to solve it using EF Core features. You can find my issue and its solution here
The solution is lying on the concept of inheritance in EF Core. Basically, you can create a new class namely "ExtendedFeature" derived from AbpFeature
. Then you can add a new DbSet
in the main context of your project and run the required migration. This will update your main table AbpFeature
and add the new columns as well as the Discriminator
columns which will be set automatically through the EF insert procedure.
If you create a new instance of ExtendedFeature
the discriminator
column will be set with discriminator otherwise it will be set with Feature. This will make your records distinguishable in the database.
For further information you can read this article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With