Hello, I'm using LinqToSQL, creating my entities with the designer in studio which nicely creates the designer class with all corresponding entity-classes. Normally when I wanted some custom stuff added to my entities, I would create a partial class and do the custom stuff there. Here's my problem; the new ASP.NET MVC 2 (preview) contains some nice Data Annotation Validation support, which allows you to do something like:
public class Customer
{
[Required(ErrorMessage = "Name is Required")]
public string Name { get; set; }
}
Can anybody advise me how to handle this? I was hoping not to create an extra class and do some sort of mapping.. :( And it would be nice to keep the validation of my entities in my entitities :)
I hope I'm making some sense here.. thanks in advance.
Jeroen.