StringLengthAttributeConvention Classe

Definição

Uma convenção que configura o comprimento máximo com base no StringLengthAttribute aplicado na propriedade .

public class StringLengthAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.StringLengthAttribute>
type StringLengthAttributeConvention = class
    inherit PropertyAttributeConventionBase<StringLengthAttribute>
Public Class StringLengthAttributeConvention
Inherits PropertyAttributeConventionBase(Of StringLengthAttribute)
Herança

Comentários

Consulte Convenções de criação de modelo para obter mais informações e exemplos.

Construtores

StringLengthAttributeConvention(ProviderConventionSetBuilderDependencies)

Cria uma nova instância de StringLengthAttributeConvention.

Propriedades

Dependencies

Dependências para esse serviço.

(Herdado de PropertyAttributeConventionBase<TAttribute>)

Métodos

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

Chamado depois que uma propriedade complexa é adicionada a um objeto semelhante a um tipo.

(Herdado de PropertyAttributeConventionBase<TAttribute>)
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Chamado depois que o campo de backup de uma propriedade complexa é alterado.

(Herdado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Chamado depois que uma propriedade complexa é adicionada a um tipo com um atributo na propriedade ou campo CLR associado.

(Herdado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

Chamado depois que uma propriedade é adicionada ao tipo de entidade.

(Herdado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, StringLengthAttribute, MemberInfo, IConventionContext)

Chamado depois que uma propriedade é adicionada ao tipo de entidade com um atributo na propriedade ou campo CLR associado.

ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

Chamado depois que uma propriedade é adicionada ao tipo de entidade com um atributo na propriedade ou campo CLR associado.

(Herdado de PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

Chamado depois que o campo de backup de uma propriedade é alterado.

(Herdado de PropertyAttributeConventionBase<TAttribute>)

Aplica-se a