I want to use the entity framework. However I also have the requirement of allowing my users to define custom fields in our system. I would like to still use the entity framework and not use a a partial class with a hash table property.
Below is the solution I was thinking of, however it is not simple so I would like to see if there is a better way.
My idea currently, is to have a ModelManager object that would create a column on the appropriate table, modify the EDM files, and compile the files using the edmgen.exe. This would all have to happen in a different process and/or appdomain than the application, since the application would reference the resulting assembly. When the application restarts it will have access to the newly added field.
Is this the only way to do this with the Entity Framework? Thanks for your time.
After reading some blog entries by the Entity Framework team and Julie Lerman, it sounds like they are looking at making this easier for the next version. Which means as far as I can tell, the way I stated in the question is the best way to dynamically add fields to the entity framework.
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