本文整理汇总了C#中EntityKey.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# EntityKey.Equals方法的具体用法?C# EntityKey.Equals怎么用?C# EntityKey.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntityKey
的用法示例。
在下文中一共展示了EntityKey.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNextRelationshipEnd
internal RelationshipEntry GetNextRelationshipEnd(EntityKey entityKey)
{
DebugCheck.NotNull((object)entityKey);
Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
return (entityKey.Equals(Key0) ? NextKey0 : NextKey1);
}
示例2: SetNextRelationshipEnd
internal void SetNextRelationshipEnd(EntityKey entityKey, RelationshipEntry nextEnd)
{
DebugCheck.NotNull((object)entityKey);
Debug.Assert(entityKey.Equals(Key0) || entityKey.Equals(Key1), "EntityKey mismatch");
if (entityKey.Equals(Key0))
{
NextKey0 = nextEnd;
}
else
{
NextKey1 = nextEnd;
}
}
示例3: ChangeRelatedEnd
/// <summary>
/// Update one of the ends of the relationship
/// </summary>
internal void ChangeRelatedEnd(EntityKey oldKey, EntityKey newKey)
{
if (oldKey.Equals(Key0))
{
if (oldKey.Equals(Key1))
{
// self-reference
RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper.AssociationSet, newKey);
}
else
{
RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper, 0, newKey);
}
}
else
{
RelationshipWrapper = new RelationshipWrapper(RelationshipWrapper, 1, newKey);
}
}