问题
I want to create a c# application that will use the breeze web api to save change set to the server using the same SaveChanges(JObject saveBundle) action. How can I serialize and represent the changeset to be sent to the server. My primary question is how breezejs serializes the changeset when it sends it to the server. Cant we do the same with c# and for example JSON.NET
回答1:
As of later today - we are releasing a beta of a sister product to Breeze.Js called Breeze.Sharp. This is a .NET client that can talk to any Breeze service (i.e. anything that Breeze.Js can talk to) You can find the documention at http://www.breezejs.com/breeze-sharp.
Nuget:
- search for 'breeze-sharp'
GitHub repos
- breeze.sharp
- breeze.sharp.samples
回答2:
You absolutely could. I don't know that the saveBundle schema has been documented but it's not complicated. You can do any (perhaps all) of the following: inspect the payload from a BreezeJS app, read the BreezeJS Web API dataservice adapter, read the .NET ContextProvider ... and glean what you must know about the saveBundle schema and how to reproduce it yourself.
We happen to be working on something for .NET clients that will do this ... but I can't talk about it yet and have no dates for you yet either.
来源:https://stackoverflow.com/questions/21606720/saving-changes-to-breeze-web-api-from-c-sharp