RelationshipManager.GetRelatedReference<TTargetEntity> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
透過指定的關聯名稱與目標角色名稱組合,取得相關物件的 。EntityReference<TEntity>
public System.Data.Entity.Core.Objects.DataClasses.EntityReference<TTargetEntity> GetRelatedReference<TTargetEntity>(string relationshipName, string targetRoleName) where TTargetEntity : class;
member this.GetRelatedReference : string * string -> System.Data.Entity.Core.Objects.DataClasses.EntityReference<'argetEntity (requires 'argetEntity : null)> (requires 'argetEntity : null)
Public Function GetRelatedReference(Of TTargetEntity As Class) (relationshipName As String, targetRoleName As String) As EntityReference(Of TTargetEntity)
類型參數
- TTargetEntity
退回 EntityReference<TEntity>的類型。
參數
- relationshipName
- String
要處理的關係名稱。 關係名稱不符合命名空間的資格。
- targetRoleName
- String
導航的目標角色名稱。 表示關係中導航的方向。
傳回
EntityReference<TTargetEntity>
一個相關物件的。EntityReference<TEntity>