gpt4 book ai didi

dynamics-crm-2011 - 引用 CodeGeneration.CodeCustomization 对早期绑定(bind)生成的 CRM 实体有何变化?

转载 作者:行者123 更新时间:2023-12-01 02:19:55 26 4
gpt4 key购买 nike

看完this SO question ,我注意到 link in the question引用了Microsoft.Xrm.Client.CodeGeneration.CodeCustomization,Microsoft.Xrm.Client.CodeGeneration .

与标准代码生成相比,它有什么优势?根据 LameCoder,它将所有实体更改为从 Microsoft.Xrm.Client.CrmEntity 继承。而不是`Microsoft.Xrm.Sdk.Entity。这会产生哪些变化以及产生了哪些其他变化?

最佳答案

这里是 best site I could currently find关于它的作用:

  • CrmSvcUtil & OrganizationServiceContext enhancements such as lazy loading
  • Simplified Connection Management with Connection Dialog UI
  • Client Side caching extensions
  • Utility Extension functions for common tasks to speed up client development
  • Organization Service Message utility functions to make it easy to call common messages such as BulkDelete, Add Member to Team etc.
  • Objects to support the Microsoft.Xrm.Portal extensions


我可以看到从 CrmEntity 继承的唯一真正的缺点是它需要 Microsoft.Xrm.Client dll 在服务器上被 Gac'd 或 IL 合并到 Entities dll 中。

除了这个缺点之外,我看到它添加了以下功能:
  • 将 INotifyPropertyChanging 和 INotifyPropertyChanged 移到基类中,使生成的代码更小
  • 定义额外的类属性
  • System.Data.Services.Common.DataServiceKeyAttribute
  • System.Data.Services.IgnorePropertiesAttribute (我假设这个通过网络发送的数据较少?)
  • Microsoft.Xrm.Client.Metadata.EntityAttribute(我相信这是用来支持 LazyLoading
  • 选项集属性更改为可为空的整数
  • 货币属性现在是可以为空的小数
  • 将属性值设置为已经存在的值,不会触发属性更改/更改事件
  • SetPrimaryIdAttributeValue 会产生更小的代码。
  • 关于dynamics-crm-2011 - 引用 CodeGeneration.CodeCustomization 对早期绑定(bind)生成的 CRM 实体有何变化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21270081/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com