Author: c0pe | Posted on: 11/18/2010 3:55:18 PM | Views : 508

Hello,
I'm using linq to sql classes and the linqDatasource control to bind to gridviews and listviews that support inline insert/update/delete, and I'm not sure how I should be handling user input validation tasks. I often see statements like this:
"When we define a LINQ to SQL data model, we will automatically have a default set of schema based validation constraints added to our data model classes.  For example, if you try to set a null value for a required column, then the LINQ to SQL data model will raise an error to ensure our database integrity is maintained."
1) when my validation needs are just that, basic schema validation, no real 'business' rules needed, how should I be handling validation? For example, I need to check for two things, input is not empty/null, and input does not exceed max length. Should I just be using linq to sql's built-in validation? if so, where should I be catching the excep ...

Go to the complete details ...