0
hans abelshausen created
Hi,
I'm trying to increase the max value of the Value field. In database it is declared as max, but if I try to insert a new entry following error occures: Value: Das Feld "Value" muss ein Zeichenfolgen- oder Arraytyp mit einer maximalen Länge von 2000 sein.
In my code I try this: public class UserSetting : Setting { [MaxLength] public override string Value { get; set; } }
I'm using abp 0.7.5
1 Answer(s)
-
0
Hi,
You can change it like this at OnModelCreating of your DbContext.
modelBuilder.Entity<Setting>().Property(p => p.Value).HasMaxLength(4000);