I am running into a problem where my CRUD operations on an entity sourced from an SQL View is not calling the generated methods for said operations.
Example:
I press "Delete" in a ListView on an item, connected to a LinqDataSource. It throws an error saying that it cannot perform the operation because it affects multiple base tables. That's fine, I understand that. What I don't understand is why this code won't run on insert/delete:
Public Partial Class Entity
Private Sub DeleteEntity(instance as Entity)
Throw New Exception("TEST")
End Sub
End Class
In debug, it won't break on the method, so it's not being called. I even did a test where I deleted the entity by attaching/DeleteOnSubmit and still no-go. Is this a bug or am I not handling the right method?
Note: Yes, I can handle a data source's OnDeleting event, cancel, etc. (which is my temporary fix) but I'd really like to catch ALL delete operations in a central place no matter how I delete the entity.