<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : StringLengthVerifier attribute with CF Migration</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : StringLengthVerifier attribute with CF Migration</description>
  <pubDate>Sat, 11 Apr 2026 12:35:02 -700</pubDate>
  <lastBuildDate>Wed, 21 Mar 2012 01:55:01 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3347</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>StringLengthVerifier attribute with CF Migration : Thank Denisk,I will investigate...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3347&amp;PID=13043#13043</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3347<br /><strong>Posted:</strong> 21-Mar-2012 at 1:55am<br /><br />Thank Denisk,&nbsp;<div><br></div><div>I will investigate your solution.</div><div><br></div><div>That might also help me solving my problem with CF Migration and the need of multiple Model, because actually I can't find the best way to do it !!</div><div><br></div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 21 Mar 2012 01:55:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3347&amp;PID=13043#13043</guid>
  </item> 
  <item>
   <title>StringLengthVerifier attribute with CF Migration :  Hi Walid,Do you mean that the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3347&amp;PID=13039#13039</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3347<br /><strong>Posted:</strong> 20-Mar-2012 at 3:19pm<br /><br />Hi Walid,<div><br></div><div>Do you mean that the StringLengthVerifierAttribute gets ignored when you run the "Add-Migration" command from your Package Manager Console?</div><div><br></div><div>If so, this is expected and outside of DevForce control as Add-Migration is an Entity Framework method and as such it can only recognize the attributes that it knows. And I'm guessing it only recognize attributes listed in <a href="http://msdn.microsoft.com/en-us/library/gg197525%28v=vs.103%29.aspx" target="_blank">Code First Data Annotations</a>.</div><div><br></div><div>If you want to use DevForce Verifier attributes, and if it were me, I would do the following steps:</div><div><br></div><div>1. Use&nbsp;EF Code First attributes first to build the migration scaffolding</div><div>2. Run migration and update the database</div><div>3. Use&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-sec&#111;nd" target="_blank">DevForce Code Second</a>&nbsp;to help generate the new entities and their properties complete with DevForce Verifier attributes.</div><div><br></div><div>It's not quite as straightforward but it's an option. Hopefully someone smarter than me can chime in :)</div><span style="font-size:10px"><br /><br />Edited by DenisK - 20-Mar-2012 at 3:22pm</span>]]>
   </description>
   <pubDate>Tue, 20 Mar 2012 15:19:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3347&amp;PID=13039#13039</guid>
  </item> 
  <item>
   <title>StringLengthVerifier attribute with CF Migration : Hi,In the dochttp://drc.ideabl...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3347&amp;PID=13027#13027</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3347<br /><strong>Posted:</strong> 20-Mar-2012 at 3:36am<br /><br />Hi,<div><br></div><div>In the doc&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/code-first-entity-classes" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/code-first-entity-classes</a>&nbsp;it is recommended to use the StringLengthVerifier attribute with CF class.</div><div><br></div><div>The problem is this attribute is totally ignored while using CF Migration. So I find myself having to duplicate those information in the Fluent API to be sure the fields will have the required size etc ...</div><div><br></div><div>Is this a bug or a normal behavior ? &nbsp;I can't imagine duplicate this information on all the entities ...</div><div><br></div><div><br></div><div>regards&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 20 Mar 2012 03:36:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3347&amp;PID=13027#13027</guid>
  </item> 
 </channel>
</rss>