entity framework with plugin datatypes – Education Career Blog

I want to build a system where user plugins can implement an interface for different data elements which are to be stored in a database. Now since I don’t know the details of implementation until runtime, I can’t create my database to encompass all derived types… but is it possible to perhaps:

a) Manage entities only at the interface level, so regardless of the concrete types implemented by the user, I could manage the relationships between entities at the interface level

b) have the plugins themselves manage the EF persistence of the concrete classes, so in the end we have one entity context to manage the relationships between entities at the interface level, and additional contexts to store concrete implementations in another database

Its a long shot, but I’m hoping someone would know if something like this might work.

,

Correct me if I’m wrong but It sounds like you want to implement an EAV (Entity Attribute Value) structure using the Entity Framework

Leave a Comment