title: Validation does not work when I use Validator.TryValidateObject
body: <p>DataAnnotations does not work with buddy class. The following code always validate true. Why ?</p>
  
  <p>var isValid = Validator.TryValidateObject(new Customer(), Context, results, true);</p>
  
  <p>and here is the buddy class. </p>
  
  <pre><code>public partial class Customer 
  { 
      public string Name { get; set; } 
      public int Age { get; set; } 
  }
  
  [MetadataType(typeof(CustomerMetaData))]
  public partial class Customer 
  { 
      public class CustomerMetaData 
      { 
          [Required(ErrorMessage = "You must supply a name for a customer.")]        
          public string Name { get; set; } 
      } 
  }
  </code></pre>
  
  <p>Here is another thread with same question., but no answer.
  <a href="https://stackoverflow.com/questions/2050161/validating-dataannotations-with-validator-class">link text</a></p>