Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building an extensible data model, EF 4

I have a question very similar to this, How do you build extensible data model, with regards to building an application using an extensible data model, except using EF 4.

My requirement is to be able to allow usersi of my application to extend the data model at runtime on the fly. We're currently underway with building the system and have made use of EF as the DAL layer, with POCO classes generated from the standard T4 template.

Taking this post by Ayende, http://ayende.com/blog/3498/multi-tenancy-extensible-data-model, as a concise summary of the options, we've taken the option of an xml column in a table allowing us to put pretty much anything in there with no need to recompile.

As I understand it, the extended table approach would be better, it seems to work quite nicely for dynamics CRM, however how/would it be possible whilst using EF 4 on the fly?

like image 326
stu432 Avatar asked Nov 14 '22 22:11

stu432


1 Answers

One possible solution to this kind of task is the EAV Pattern > http://en.wikipedia.org/wiki/Entity-attribute-value_model

like image 57
MattDavey Avatar answered Dec 23 '22 09:12

MattDavey