RequiredPropertyAttributeConvention 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
如果屬性已套用,則會視需要設定屬性的 RequiredAttribute 慣例。
public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>
public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyFieldChangedConvention
type RequiredPropertyAttributeConvention = class
inherit PropertyAttributeConventionBase<RequiredAttribute>
type RequiredPropertyAttributeConvention = class
inherit PropertyAttributeConventionBase<RequiredAttribute>
interface IComplexPropertyAddedConvention
interface IConvention
interface IComplexPropertyFieldChangedConvention
Public Class RequiredPropertyAttributeConvention
Inherits PropertyAttributeConventionBase(Of RequiredAttribute)
Public Class RequiredPropertyAttributeConvention
Inherits PropertyAttributeConventionBase(Of RequiredAttribute)
Implements IComplexPropertyAddedConvention, IComplexPropertyFieldChangedConvention
- 繼承
- 實作
備註
如需詳細資訊和範例,請參閱 模型建置慣例 。
建構函式
RequiredPropertyAttributeConvention(ProviderConventionSetBuilderDependencies) |
建立 RequiredPropertyAttributeConvention 的新執行個體。 |
屬性
Dependencies |
此服務的相依性。 (繼承來源 PropertyAttributeConventionBase<TAttribute>) |