Creating blob properties with Entity Framework 4?

Posted by David Veeneman on Stack Overflow See other posts from Stack Overflow or by David Veeneman
Published on 2010-03-18T20:20:40Z Indexed on 2010/03/18 20:21 UTC
Read the original article Hit count: 1261

I am creating an EF4 model-first application with a WPF UI. One of the controls on my UI is a RichTextDocument, which outputs a WPF FlowDocument. I can either serialize the FlowDocument to a byte array, or extract its XAML markup as a string. I would prefer to use binary serialization, if I can. Here are my questions:

  • If I serialize to a byte array, how do I specify an entity property as a byte array in the EDM Designer?

  • If I extract a XAML markup string, can I specify that the EDM Designer create the corresponding database column as a nvarchar(max) column?

As to the second question, I assume I could always manually edit the MyModel.edmx.sql file to change the data type from nvarchar(4000) to nvarchar(max) before executing it, but I would like to know if it can be done in the Designer.

Thanks for your help.

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about flowdocument