NonNullableNavigationConvention 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個將不可空除導覽設定為主實體類型(principal entity type)的慣例。
public class NonNullableNavigationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPrincipalEndChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention
public class NonNullableNavigationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NonNullableConventionBase, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention
type NonNullableNavigationConvention = class
inherit NonNullableConventionBase
interface INavigationAddedConvention
interface IConvention
interface IForeignKeyPrincipalEndChangedConvention
type NonNullableNavigationConvention = class
inherit NonNullableConventionBase
interface INavigationAddedConvention
interface IConvention
Public Class NonNullableNavigationConvention
Inherits NonNullableConventionBase
Implements IForeignKeyPrincipalEndChangedConvention, INavigationAddedConvention
Public Class NonNullableNavigationConvention
Inherits NonNullableConventionBase
Implements INavigationAddedConvention
- 繼承
- 實作
備註
更多資訊與範例請參閱 模型建構慣例 。
建構函式
| 名稱 | Description |
|---|---|
| NonNullableNavigationConvention(ProviderConventionSetBuilderDependencies) |
一個將不可空除導覽設定為主實體類型(principal entity type)的慣例。 |
屬性
| 名稱 | Description |
|---|---|
| Dependencies |
此服務的依賴關係。 (繼承來源 NonNullableConventionBase) |
方法
| 名稱 | Description |
|---|---|
| IsNonNullableReferenceType(IConventionModelBuilder, MemberInfo) |
回傳一個值,表示成員類型是否為不可空的參考類型。 (繼承來源 NonNullableConventionBase) |
| ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>) |
在外鍵主端變更後被呼叫。 |
| ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>) |
模型最終定案後才會被通知。 移除此慣例中使用的快取狀態註解。 (繼承來源 NonNullableConventionBase) |
| ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>) |
當模型正在定案時會被召喚。 (繼承來源 NonNullableConventionBase) |
| ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>) |
在新增導航到實體類型後呼叫。 |
| ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>) |
在新增導航到實體類型後呼叫。 |
| TryGetNullabilityInfo(IConventionModelBuilder, MemberInfo, NullabilityInfo) |
回傳一個值,表示成員類型是否為不可空的參考類型。 (繼承來源 NonNullableConventionBase) |