Linq To Sql Checkout
I have a class that contains Linq To SQL objects that are used to populate drop downlists in a view. Using Scott Gu Nerd's lesson I am implementing their validation system using partial classes. This works great when working with one object (like dinner) for each view. But when I use a class that is not a Linq To Sql object, I cannot get the validation to work. Any ideas?
0
a source to share
1 answer
Nerd Dinner app uses events that fire when Linq To SQL saves data. In particular, the OnValidate () method.
Since you have a class that is not Linq To Sql, you can fake it by creating your own custom event handler and include it when data changes.
Alternatively, just call the method that validates the given object, calling as many validation functions as you have objects.
+1
a source to share