I'm validating entities in EF4.1 with the On[Property]Changing partial methods in a VS2010 Winforms project.
Example: OnJobNumberChanging(value As String)
I throw an ArgumentException in them if 'value' violates a rule.
When editing in a DataGridView which is bound to the results of an ObjectQuery, user clears the text in a cell bound to a property which is not nullable and tabs out. Code enters the partial method, exception is thrown.
Where then do I catch this exception? I am unable to find the correct event. Exception message is, "ArgumentException was unhandled by user code".
Thanks
Example: OnJobNumberChanging(value As String)
I throw an ArgumentException in them if 'value' violates a rule.
When editing in a DataGridView which is bound to the results of an ObjectQuery, user clears the text in a cell bound to a property which is not nullable and tabs out. Code enters the partial method, exception is thrown.
Where then do I catch this exception? I am unable to find the correct event. Exception message is, "ArgumentException was unhandled by user code".
Thanks