Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Increase value of Abp.Settings value field #1354


User avatar
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)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can change it like this at OnModelCreating of your DbContext.

    modelBuilder.Entity<Setting>().Property(p => p.Value).HasMaxLength(4000);