title: partial classes + DataAnnotations
body: <p>I've got a class that was generated for me by the Entity Framework:</p>
  
  <p><strong>Models/EF.tt/Product.cs</strong></p>
  
  <pre><code>public partial class X
  {
    public int Name { get; set; }
    ...
  }
  </code></pre>
  
  <p>I don't want to modify it because it's managed by the EF editor and it will wipe out my modifications any time I regenerate it, so I'm putting code into a separate file.  Because the classes are declared as <em>partial</em> I can do useful things... what I haven't been able to figure out is how to use DataAnnotations for the properties.</p>
  
  <p><strong>Models/EF.custom.cs</strong></p>
  
  <pre><code>public partial class X
  {
    [Display(Name = "My Name")]
    public int Name { get; set; }
    ...
  }
  </code></pre>
  
  <p>which fails... what is the proper way to do this?</p>