I havea simple EF Model with a Test entity and I want to make use of partial classes to add validation like this:
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"));
}
}
}
But I get this error:
Partial declarations of 'Model.Test' must not specify different base classes.
I understand the error but how can I use EF4 Models and still have access to all my business validation goodness?
BusinessObject has all the validation and stuff, so if I can get them working happily together, I'm all done. Hope someone can help.
Richard