modelBuilder add only one variable with different varchar

0

On my system, I have a small code that adds varchar to all the variables added in the database

modelBuilder.Properties<string>()
.Configure(p => p.HasMaxLength(150));

I need only one variable to be varchar (1000) could anyone help me?

    
asked by anonymous 10.05.2017 / 20:03

1 answer

2

I was able to resolve my doubts, I'll be posting below the code here

public EventosAdversosConfig()
{
    Property(x => x.diaea1)
        .HasColumnType("varchar")
        .HasMaxLength(1000)
        .IsOptional();
}
    
11.05.2017 / 16:40