C# – Dynamic entity in EF1/change model in runtime/add property dynamicaly

asp.netcentity-frameworklinq-to-entities

I want to give users the possibility to dynamically add new columns at the runtime. I am using the Entity framework v1 …

I did manage to read as xml and then change ssdl , csdl and msl files and construct new workspace and new object context…
But the problem is when i dynamically add new columns in EF model the underlying object is not changed, of course.

How to get the data from model without having concrete entity ? Anonymous type or DBDataRecord would be just fine… Or even some new type created at runtime…

Any idea ?

Best Answer

Changing the Entity Model CSDL/SSDL will not change the types, because they are used to generate the types at design time. I don't think there is any practical way to modify those types at runtime to reflect your changes to the model.