Ent Lib Validation App Block & LINQ

Topics: Validation Application Block
Oct 8, 2008 at 3:21 PM
Will there be a new release of the Ent Lib specifically to aid using LINQ?
The Validation Application Block is excellent but the setters for the columns of database tables in LINQ to SQL is held within the <Name of dbml file>.designer.cs which gets refreshed when you change anything in the dbml.

I have proved the concept that if you add the Validation App Block attributes to columns then the errors can be viewed on the Client, e.g.

        [StringLengthValidator(1, 40, Ruleset="RuleSetA", MessageTemplate="The Company Name must be between 1 and 40 characters")]
        [Column(Storage="_CompanyName", DbType="NVarChar(40) NOT NULL", CanBeNull=false)]
        public string CompanyName
                return this._CompanyName;
                if ((this._CompanyName != value))
                    this._CompanyName = value;

I am aware you can add code to the OnCompanyNameChanging method to perform validation but the above is better.