共用方式為


NavigationBuilder.IsRequired(Boolean) 方法

定義

設定是否需要此流覽。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder IsRequired (bool required = true);
abstract member IsRequired : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder
override this.IsRequired : bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.NavigationBuilder
Public Overridable Function IsRequired (Optional required As Boolean = true) As NavigationBuilder

參數

required
Boolean

值,指出是否應該需要導覽。

傳回

相同的產生器實例,以便鏈結多個組態呼叫。

適用於