Modifying an Entity Framework Model at Run-Time

后端 未结 5 943
遇见更好的自我
遇见更好的自我 2020-12-07 01:08

This is purely a conceptual and design idea related to EF4.

The example/scenario is a large ERP or CRM type system where companies may need to add traditional \"user

5条回答
  •  暖寄归人
    2020-12-07 01:10

    This is a version of Reserved fields from @KristoferA answer that I have used in the past.

    You can add one extra XML (or JSON) column on each table that is likely to require custom data and then read/write it from db using EF. After read deserialize XML (JSON) and pass it to the mechanism that is supposed to handle the mappings then present it to user. Same goes for writing data you read it from UI -> map to object -> serialize to XML (JSON) -> and write to these extra fields.

提交回复
热议问题