Last post Jun 10, 2010 09:30 AM by sjnaughton
Jun 09, 2010 05:26 AM|dizruptor|LINK
I'm using Linq2SQL property changing events to perform validation when inserting new records. Problem is that the event also fires when I delete a record and the validation code doesn't
make sense with deletes. How can I differentiate between inserts and deletes?
Jun 09, 2010 07:08 AM|sjnaughton|LINK
Hi Simon, I always use the Updating Inserting and Deleting events to do validation as I have had the same issue as you are, you would think there was some value set to let you know what was happening but no [:(]
Jun 09, 2010 10:48 PM|dizruptor|LINK
Thanks for the tip Steve, I found another solution by using the OnValidate event instead.
Jun 10, 2010 09:30 AM|sjnaughton|LINK
No problem Simon, I still find I get better control with the other method [:)]