本文整理汇总了C#中EntityReference.Includes方法的典型用法代码示例。如果您正苦于以下问题:C# EntityReference.Includes方法的具体用法?C# EntityReference.Includes怎么用?C# EntityReference.Includes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntityReference
的用法示例。
在下文中一共展示了EntityReference.Includes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test_Includes_Match
public void Test_Includes_Match()
{
Guid id1 = Guid.NewGuid();
Guid id2 = Guid.NewGuid();
string propertyName1 = "Property1";
string propertyName2 = "Property2";
string type1 = "Type1";
string type2 = "Type2";
EntityReference reference = new EntityReference();
reference.Entity1ID = id1;
reference.Entity2ID = id2;
reference.Type1Name = type1;
reference.Type2Name = type2;
reference.Property1Name = propertyName1;
reference.Property2Name = propertyName2;
bool includes = reference.Includes(id1, propertyName1);
Assert.IsTrue(includes, "Returned false when it should have returned true");
includes = reference.Includes(id2, propertyName2);
Assert.IsTrue(includes, "Returned false when it should have returned true");
}