SqlServerStoreGenerationConvention 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
慣例,可確保屬性未設定為具有預設值,如計算資料行或 SqlServerValueGenerationStrategy 同時使用 。
C#
public class SqlServerStoreGenerationConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.StoreGenerationConvention
type SqlServerStoreGenerationConvention = class
inherit StoreGenerationConvention
Public Class SqlServerStoreGenerationConvention
Inherits StoreGenerationConvention
- 繼承
如需詳細資訊和範例,請參閱使用 EF Core建立模型慣例和存取SQL Server和Azure SQL資料庫。
Sql |
建立 SqlServerStoreGenerationConvention 的新執行個體。 |
Dependencies |
此服務的相依性。 (繼承來源 StoreGenerationConvention) |
Relational |
此服務的關聯式提供者特定相依性。 (繼承來源 StoreGenerationConvention) |
Process |
在模型完成之後呼叫。 (繼承來源 StoreGenerationConvention) |
Process |
當模型完成時呼叫。 (繼承來源 StoreGenerationConvention) |
Process |
在屬性上變更批註之後呼叫。 |
Validate(IConvention |
如果這個屬性有衝突的存放區產生組態,則會擲回 。 |
Validate(IConvention |
如果這個屬性有衝突的存放區產生組態,則會擲回 。 (繼承來源 StoreGenerationConvention) |
Validate(IConvention |
慣例,可確保屬性未設定為具有預設值,如計算資料行或 SqlServerValueGenerationStrategy 同時使用 。 |
Validate(IConvention |
如果這個屬性有衝突的存放區產生組態,則會擲回 。 (繼承來源 StoreGenerationConvention) |
產品 | 版本 |
---|---|
Entity Framework Core | 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |