IOrganizationService更新实体正确的方法 [英] IOrganizationService correct way to update entities

查看:1250
本文介绍了IOrganizationService更新实体正确的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有从C#中看看更新的最佳方法/检索实体。 。我已经通过MSDN文档,但读不确定该走哪条路/时,使用这两种方法

I'm having a look at the best way of updating/retrieve entities from within C#. I've had a read through the MSDN documentation but unsure which way to go/when to use either method.

所以,我的问题:

我应该使用:


  • IOrganizationService.Update()更新和直接的实体;或

  • IOrganization.Execute()并创建一个更新请求

  • IOrganizationService.Update() and update the entity directly; or
  • IOrganization.Execute() and create an update request

如果答案是这取决于',有什么情况需要哪种方法?

And if the answer is 'it depends', what situation warrants which method?

感谢

推荐答案

第一,执行一个UpdateRequest的产生同样的结果。

First of all both Update and Execute of an UpdateRequest produce the same result.

的主要区别在于,一个UpdateRequest可以使用ExecuteMultipleRequest分批

The main difference is that an UpdateRequest can be batched using the ExecuteMultipleRequest

这篇关于IOrganizationService更新实体正确的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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