开发者

Serializing an entity's field using Entity Framework 4

开发者 https://www.devze.com 2023-01-24 09:41 出处:网络
I\'ve recently been working on a portal using MVC2 and I\'m trying to use EF4 as the DAL. I have an entity called WidgetInstance which serializes it\'s state into json. EF4 correctly identifies this

I've recently been working on a portal using MVC2 and I'm trying to use EF4 as the DAL.

I have an entity called WidgetInstance which serializes it's state into json. EF4 correctly identifies this as a string field but I need this to deserialize to a List<WidgetState开发者_JS百科> when it's loaded and serialize back to a string when saving/updating.

I've googled and SO'd for an hour or so now without much success. I don't really want to create a new DB table for the widget states.

Has anyone attempted to do this before or have any pointers where I can get started with this?

Thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消