RelationalValueGenerationConvention 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
這是一種將儲存值產生設定為 OnAdd 主鍵一部分的屬性,而非任何外鍵,或設定為資料庫預設值的屬性的慣例。 它也會將屬性配置成 OnAddOrUpdate 計算欄位。
[System.Runtime.CompilerServices.Nullable(0)]
public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
public class RelationalValueGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ValueGenerationConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IPropertyAnnotationChangedConvention
[<System.Runtime.CompilerServices.Nullable(0)>]
type RelationalValueGenerationConvention = class
inherit ValueGenerationConvention
interface IPropertyAnnotationChangedConvention
interface IConvention
interface IEntityTypeAnnotationChangedConvention
type RelationalValueGenerationConvention = class
inherit ValueGenerationConvention
interface IPropertyAnnotationChangedConvention
interface IConvention
type RelationalValueGenerationConvention = class
inherit ValueGenerationConvention
interface IPropertyAnnotationChangedConvention
interface IConvention
interface IEntityTypeAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IEntityTypeAnnotationChangedConvention, IPropertyAnnotationChangedConvention
Public Class RelationalValueGenerationConvention
Inherits ValueGenerationConvention
Implements IPropertyAnnotationChangedConvention
- 繼承
- 衍生
- 屬性
- 實作
備註
更多資訊與範例請參閱 模型建構慣例 與 EF核心價值生成 。
建構函式
| 名稱 | Description |
|---|---|
| RelationalValueGenerationConvention(ProviderConventionSetBuilderDependencies, RelationalConventionSetBuilderDependencies) |
建立一個新的 實例。RelationalValueGenerationConvention |
屬性
| 名稱 | Description |
|---|---|
| Dependencies |
此服務的依賴關係。 (繼承來源 ValueGenerationConvention) |
| RelationalDependencies |
此服務的關聯提供者專屬相依關係。 |