Adam Schroder

Its Schotime.com!

Integrating xVal Validation with Linq-to-Sql

In a previous post I showed you how you can use xVal and the IDataErrorInfo class to add validation to your Asp.net MVC website. In this post I will extend that to Linq-to-Sql and the classes it generates.

The northwind database has a suppliers table. The info contained below is using that table with linq-to-sql.

After adding the table to the designer, a Supplier class gets constructed in the background. This class is a partial class which means we can add to it without changing the code auto-generated in the designer.cs file.

Click here to keep reading…

Cheers,
Adam

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)