次の方法で共有


OptionalNavigationPropertyConfiguration<TEntityType,TTargetEntityType>.WithRequired メソッド

定義

オーバーロード

WithRequired()

リレーションシップのもう一方の側のナビゲーション プロパティを使用せずに省略可能対必須となるようにリレーションシップを構成します。

WithRequired(Expression<Func<TTargetEntityType,TEntityType>>)

リレーションシップのもう一方の側のナビゲーション プロパティを使用して省略可能対必須となるようにリレーションシップを構成します。

WithRequired()

リレーションシップのもう一方の側のナビゲーション プロパティを使用せずに省略可能対必須となるようにリレーションシップを構成します。

public System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration WithRequired();
member this.WithRequired : unit -> System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration
Public Function WithRequired () As ForeignKeyNavigationPropertyConfiguration

戻り値

関係をさらに構成するために使用できる構成オブジェクト。

適用対象

WithRequired(Expression<Func<TTargetEntityType,TEntityType>>)

リレーションシップのもう一方の側のナビゲーション プロパティを使用して省略可能対必須となるようにリレーションシップを構成します。

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration WithRequired(System.Linq.Expressions.Expression<Func<TTargetEntityType,TEntityType>> navigationPropertyExpression);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration WithRequired(System.Linq.Expressions.Expression<Func<TTargetEntityType,TEntityType>> navigationPropertyExpression);
member this.WithRequired : System.Linq.Expressions.Expression<Func<'argetEntityType, 'EntityType>> -> System.Data.Entity.ModelConfiguration.Configuration.ForeignKeyNavigationPropertyConfiguration
Public Function WithRequired (navigationPropertyExpression As Expression(Of Func(Of TTargetEntityType, TEntityType))) As ForeignKeyNavigationPropertyConfiguration

パラメーター

navigationPropertyExpression
Expression<Func<TTargetEntityType,TEntityType>>

リレーションシップのもう一方の End のナビゲーション プロパティを表すラムダ式。 C#: t => t.MyProperty VB.Net: Function(t) t.MyProperty

戻り値

関係をさらに構成するために使用できる構成オブジェクト。

属性

適用対象