I must assume that you do not and do not need to cascade deletion in your database. Personally, I was "scared" of deletions in general and try to avoid them. I prefer soft deletion (marking the entry as inactive). But not everyone agrees or may follow suit.
I would like to add a Web API method to your controller (say, "DeleteCustomerAndOrders"). You can call any API method from your client, not just the Breeze method.
By recommending this, I suggest that such a thing is a relative rarity in your application. You do not need a general-purpose deactivator that accepts an array of identifiers of the parent objects that will delete some child objects and not others, ... etc. Etc.
Follow this path and you will transfer the problem from the client to the server. This is good: you did not need to load orders on the client. Now you need to get rid of them on the server. If you use the Entity Framework, you are faced with the same challenge of deleting orders without loading them. Check out Alex James's solution: Mass removal in LINQ for objects .
source share