LINQ-to-SQL - C# - OnValidate()

Posted by Mark Comix on Stack Overflow See other posts from Stack Overflow or by Mark Comix
Published on 2010-03-11T13:36:25Z Indexed on 2010/04/10 15:03 UTC
Read the original article Hit count: 317

Filed under:
|

Hello, I have a system with 3 layers and I am using LINQ-to-SQL to persist.

I want to validate if the description field of my object is empty. I am using partial classes and the method OnValidate(). If the field is empty, it throws an exception.

Is this correct?

What do I do after the exception to not close the form, letting the user continue working?

Thank you very much

Sorry for my poor english

© Stack Overflow or respective owner

Related posts about linq-to-sql

Related posts about c#