MaxLengthAttributeConvention 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
一种约定,该约定基于 MaxLengthAttribute 对 属性应用的 配置最大长度。
public class MaxLengthAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.MaxLengthAttribute>
public class MaxLengthAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.MaxLengthAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention
type MaxLengthAttributeConvention = class
inherit PropertyAttributeConventionBase<MaxLengthAttribute>
type MaxLengthAttributeConvention = class
inherit PropertyAttributeConventionBase<MaxLengthAttribute>
interface IComplexPropertyAddedConvention
interface IConvention
Public Class MaxLengthAttributeConvention
Inherits PropertyAttributeConventionBase(Of MaxLengthAttribute)
Public Class MaxLengthAttributeConvention
Inherits PropertyAttributeConventionBase(Of MaxLengthAttribute)
Implements IComplexPropertyAddedConvention
- 继承
- 实现
注解
有关详细信息和示例,请参阅 模型生成约定 。
构造函数
MaxLengthAttributeConvention(ProviderConventionSetBuilderDependencies) |
创建 MaxLengthAttributeConvention 的新实例。 |
属性
Dependencies |
此服务的依赖项。 (继承自 PropertyAttributeConventionBase<TAttribute>) |