I have a class that I want to keep meta data for -- there a several interaction scenarios so meta allows me to keep different meta for different interaction types.
Have your Entity Framework object be simple and have a String property for the column in the database.
class Feed()
{
Guid FeedId { get; set; }
String Meta { get; set; }
}
Create methods that save and load the property as such: (it's been a while since I've used EF, so i'm not sure if you can create a transient property with these getter/setters or if you need something else)
//Reading from string column Meta
(ObjectMetaDictionary) XamlServices.Load(new StringReader(someFeed.Meta));
//Saving to string column Meta
someFeed.Meta = XamlServices.Save(value);
This brings another whole issue to your project though. Changing your ObjectMetaDictionary
might cause it to not deserialize from the database correctly. Your ObjectMetaDictionary
becomes essentially part of your database schema and you will need to handle versioning or changes accordingly.