I am looking at using EViL http://www.codeplex.com/evil to do some simple validation, is it possible to get the code generator to add the attributes when it writes the classes?
something like:
/// <summary> The Comment property of the Entity Comment<br/><br/>
/// </summary>
/// <remarks>Mapped on table field: "Comment"."Comment"<br/>
/// Table field type characteristics (type, precision, scale, length): VarChar, 0, 0, 2147483647<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
[ValidateMinLength(1, "Comment must not be empty")]
public virtual System.String Comment
{
get { return (System.String)GetValue((int)CommentFieldIndex.Comment, true); }
set { SetValue((int)CommentFieldIndex.Comment, value); }
}
I know you do your own validation, just looking into all the options. And EVil is such a cool name
Cheers
--Sam