RequiredPropertyAttributeConvention Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A convention that configures properties as required if they have the RequiredAttribute applied.
C#
public class RequiredPropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>
C#
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
- Inheritance
- Implements
See Model building conventions for more information and examples.
Required |
Creates a new instance of RequiredPropertyAttributeConvention. |
Dependencies |
Dependencies for this service. (Inherited from PropertyAttributeConventionBase<TAttribute>) |
מוצר | גירסאות |
---|---|
Entity Framework Core | 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.
משוב של Entity Framework
Entity Framework הוא פרויקט קוד פתוח. בחר קישור כדי לספק משוב: