<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Adding Validation to the Model</title><link>http://www.asp.net</link><pubDate>Sun, 25 Sep 2011 14:48:42 GMT</pubDate><generator>umbraco</generator><description>Comments for Adding Validation to the Model</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/27665" rel="self" type="application/rss+xml" /><item><title>Comment Posted by artcolman</title><link>http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/vb/adding-validation-to-the-model</link><pubDate>Sun, 25 Sep 2011 14:48:42 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014261</guid><description><![CDATA[ <p>When adding the validation attributes to properties managed by an Entity Framework Context you can&#39;t add the attributes to the partial class that is associated with the model. Instead you need to create a class that will contain similarly named properties that you will associate with the model class via the MetadataType attribute. See <a rel="nofollow" href="http://drybridge.wordpress.com/2011/09/25/validation-metadata-and-entity-framework/" target="_blank">drybridge.wordpress.com/</a> for an example.</p><p></p><p>Art Colman</p><p><a rel="nofollow" href="http://www.drybridge.com" target="_blank">www.drybridge.com</a></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/artcolman.jpg?forceidenticon=false&amp;dt=635072707800000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>