保存前对同一对象多次调用 DataServiceContext.UpdateObject
如果您对某个对象调用 DataServiceContext.UpdateObject 方法、更新该对象(例如更改属性)、再次对其调用 DataServiceContext.UpdateObject 方法并最终保存,会发生什么情况?
我最近跟踪了一个奇怪的错误,看起来这就是罪魁祸首,尽管我仍然不明白它实际上在做什么。保存将失败,重试将执行另一个 UpdateObject(通常数据略有不同)。有没有办法“清除”保存之前发生的任何先前更新?
What happens if you call the DataServiceContext.UpdateObject method on an object, update that object (say, change a property), call the DataServiceContext.UpdateObject method on it again and finally save?
I recently tracked a weird bug and it looks like that was the culprit although I still don't understand what it was actually doing. The save would fail and retrying was performing another UpdateObject (usually with slightly different data). Is there a way to "clear" any previous updates that have occurred before a save?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论