使用Breeze JS将更改保存到RESTful URL [英] Save changes to RESTful URLS with Breeze JS

查看:54
本文介绍了使用Breeze JS将更改保存到RESTful URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用Breeze。我没有使用.Net。我已经使用edmunds示例获取数据,但是现在我正尝试发布数据。

I'm just getting started with Breeze. I'm not using .Net. I've used the edmunds example to GET data, but now I'm trying to POST data.

我尝试使用manager.saveChanges()发布集合对 SaveChanges URL的更改。虽然这很棒,但我更愿意选择将更改分别发送到RESTful URL(即,更新待办事项将POST到todo /:id)。

I've tried using manager.saveChanges() which posts a collection of changes to a "SaveChanges" URL. While this is awesome, I'd prefer to have the option of sending the changes individually to RESTful URLS (ie, updating a todo would POST to todo/:id).

可以通过任何方式配置Breeze吗?

Is there any way to configure Breeze to do this?

是否失败, SaveChanges URL是否可自定义?

Failing that, is the "SaveChanges" URL customizable?

推荐答案

我们正在努力解决这个问题,但尚不可用。很快...

We are working on exactly that, but it isn't available yet. Soon...

您现在可以做的是,通过SaveOptions.resourceName属性更改 SaveChanges的服务器端点。 (有关更多信息,请参见EntityManager.SaveChanges api)。您也可以在服务器上拦截SaveChanges调用。 (请参见Breeze文档中的保存拦截。)

What you can do right now, is change the server endpoint for 'SaveChanges' via the SaveOptions.resourceName property. (See the EntityManager.SaveChanges api for more info). You can also intercept the SaveChanges call on the server. ( See Save interception in the Breeze Documentation).

这篇关于使用Breeze JS将更改保存到RESTful URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆