gpt4 book ai didi

c# - Microsoft.Xrm.Sdk.EntityReference.Equals(obj) 行为

转载 作者:行者123 更新时间:2023-12-01 17:46:38 24 4
gpt4 key购买 nike

该方法使用哪些字段来比较对象?我需要一个简单的方法来确定 EntityReference 的两个不同实例是否引用同一实体。如果 Equals() 方法满足我的需要,我不想重新发明自行车。

MSDN 只说 Equals 返回:

true if the specified EntityReference is equal to the EntityReference object; otherwise, false.

最佳答案

部分实验表明,Equals 方法比较“Id”和“LogicalName”字段并忽略“Name”。但我们没有测试所有可能的情况(EntityReference 中还有更多字段)。

关于c# - Microsoft.Xrm.Sdk.EntityReference.Equals(obj) 行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48448009/

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