Is there any easy way to do what seems best described as a "Cascading Delete" in LLBLGen? An example of what I'm looking for:
You've got these tables:
Customer:
-Id
Order:
-Id
-CustomerId
OrderDetail:
-Id
-OrderId
Now, I want to delete a specific Customer and all the things that depend on it (all its orders, and all its orders' orderdetails). Since the database is going to throw a fit if I delete a Customer before deleting the Orders that have its Id as a foreign key, I need to pretty much:
- Get the customer
- Get the customer's Orders
- Get each Orders' OrderDetails
- Delete each OrderDetail
- Delete each Order
- Delete each customer
Now, this seems like a pretty common task- I'd think there's be some sort of Delete(Entity entityToDelete, bool isRecursive) function somewhere. Anyway, is there any easy way to do this?