Dynamic entity in EF1/change model in runtime/add property dynamicaly

前端 未结 2 1849
感动是毒
感动是毒 2021-01-21 23:38

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 ss

相关标签:
2条回答
  • 2021-01-21 23:48

    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.

    0 讨论(0)
  • 2021-01-21 23:51

    In v1, you would need to generate a new assembly. This would also require redistributing EdmGen. I don't know if that's legal.

    In EF v4, you could probably combine C# dynamic types with code-only modeling and come up with a pretty slick solution to your problem.

    0 讨论(0)
提交回复
热议问题