@Didar is correct to observe that the JObject saveBundle
is specific to the POST body sent by a Breeze client using the Web API out-of-the-box data service adapters.
I want to let you know that a Breeze client saveChanges
method call can update a conventional RESTy service with separate PUT/POST/DELETE/PATCH methods if that's what you want to do. You'll have to change the client-side "data service adapter" to one that understands your server API ... or more likely write one that matches the peculiarities of your API.
Writing a custom data service adapter not a newbie task to be sure. We'll be showing how to do it soon ... but it won't be a newbie task ... more an intermediate's task.
My point is that it is there to be done, it isn't hard, and you can take comfort that it will be within your capacity to write by the time you need it.
FWIW, none of the code you're showing actually conforms to repository or UOW patterns IMO. You're showing perfectly serviceable starter code ... code that gets you up and running with a minimum of fuss.
Once you get going, you'd refactor so that references to contextProvider
are no longer in your controllers. They'd be wrapped in a repository or unit-of-work component of some sort.
That's a story for another day.