次の方法で共有


EntityType.AddNavigationProperty メソッド

[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]

指定されたナビゲーション プロパティをこの型のメンバーに追加します。 ナビゲーション プロパティは読み取り専用フラグにかかわらず追加されます。

名前空間:  System.Data.Entity.Core.Metadata.Edm
アセンブリ:  EntityFramework (EntityFramework.dll 内)

構文

'宣言
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")> _
Public Sub AddNavigationProperty ( _
    property As NavigationProperty _
)
'使用
Dim instance As EntityType 
Dim property As NavigationProperty

instance.AddNavigationProperty(property)
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public void AddNavigationProperty(
    NavigationProperty property
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters")]
public:
void AddNavigationProperty(
    NavigationProperty^ property
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")>]
member AddNavigationProperty : 
        property:NavigationProperty -> unit
public function AddNavigationProperty(
    property : NavigationProperty
)

パラメーター

参照

参照

EntityType クラス

System.Data.Entity.Core.Metadata.Edm 名前空間