This came up in my Blazor demo when I was implementing the Delete behavior on the Folders page. When you delete a folder, you need to cascade delete its children as well. (Of course, this assumes there's no FK ref in the way, but that's irrelevant to this issue. An FK would simply block the delete.) I can implement the cascade delete via ITrigger but I have no way to report back to the UI what child records were deleted. This is important for refreshing the folder list. I created a property to hold the deleted rowIds, but this isn't in scope during the delete operation.
I was thinking what I need is a Delete overload that accepts a model instance so that unique state data will be visible to callers.
This came up in my Blazor demo when I was implementing the Delete behavior on the Folders page. When you delete a folder, you need to cascade delete its children as well. (Of course, this assumes there's no FK ref in the way, but that's irrelevant to this issue. An FK would simply block the delete.) I can implement the cascade delete via
ITrigger
but I have no way to report back to the UI what child records were deleted. This is important for refreshing the folder list. I created a property to hold the deleted rowIds, but this isn't in scope during the delete operation.I was thinking what I need is a
Delete
overload that accepts a model instance so that unique state data will be visible to callers.