title: Image datatype in EF 4.1 model first
body: <p>We have a project which used Entity Framwork 4.0. We draw the model and then generate an SQL Compact 3.5 DB.</p>
  
  <p>Since we needed a large BLOB store, we created a column with the <em>Image</em> data type (since <em>Binary</em> is limited to 8000 bytes). However, when updating to EF 4.1 our model was silently converted to having a <em>Binary</em> column instead!</p>
  
  <p>No worries, we thought, we'll just change it back. Problem is <em>Image</em> cannot be selected anymore! And - specifying binary and setting <em>length</em> to a large value, say 100000, gives an error when trying to generate the DB.</p>
  
  <p>We have found some pointers working with a <em>code first</em> approach, from <a href="http://blogs.msdn.com/b/adonet/archive/2011/04/11/ef-4-1-released.aspx" rel="nofollow noreferrer">EF 4.1 Release Notes</a>, <a href="http://blogs.msdn.com/b/adonet/archive/2011/03/29/ef-4-1-rtw-change-to-default-maxlength-in-code-first.aspx" rel="nofollow noreferrer">A related ADO.net team blog post</a>, <a href="http://erikej.blogspot.com/2011_04_01_archive.html" rel="nofollow noreferrer">A third post describing the related issue</a> and <a href="https://stackoverflow.com/questions/5737733/error-storing-image-in-sql-ce-4-0-with-asp-net-mvc-3-and-entity-framework-4-1-cod">A SO questing discussing the related issue</a>. However, all these talk about the issue using the <em>Code First</em> approach.</p>
  
  <p>Any pointers on solving it <em>Model First</em>?</p>
  
  <p>Thanks!</p>