title: Entity Framework 4 & Partial Class Inheritance
body: <p>I havea simple EF Model with a Test entity and I want to make use of partial classes to add validation like this:</p>
  
  <pre><code>namespace WebApp.Model
  {
      using WebApp.BusinessRules;
      using WebApp.BusinessRules.Rules;
      using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
  
      [HasSelfValidation]
      public partial class Test : BusinessObject
      {
          public Test()
          {
              AddRule(new ValidateRequired("Title"));
          }
      }
  }
  </code></pre>
  
  <p>But I get this error:</p>
  
  <p>Partial declarations of 'Model.Test' must not specify different base classes.</p>
  
  <p>I understand the error but how can I use EF4 Models and still have access to all my business validation goodness? </p>
  
  <p>BusinessObject has all the validation and stuff, so if I can get them working happily together, I'm all done. Hope someone can help.</p>
  
  <p>Richard</p>