这个问题是jpirok在我们的IdeaBlade论坛上发布的。由于我认为它对Breeze Stack Overflow社区有用,所以我在这里转载问题和答案。How would I use breeze against an odata service using only the server's metadata to define the model? Will the context still be able to handle crud operations to a non web api service?
I have seen
// service name is route to the Web API controller var serviceName = 'api/CarBones'; /*** dataservice proper ***/ // manager (aka context) is the service gateway and cache holder var manager = new entityModel.EntityManager(serviceName);
Can I do something like replacing the serviceName with an oData uri and then continue using breeze as usual?
var serviceName = "http://localhost:1234/Northwind.svc"
Thanks for your help!