Feech
Feech

Reputation: 504

Extend size of Settings Value beyond 2,000 characters

How can we extend the ability to use AbpSettings beyond the 2,000 character limit? We would like to store things like email templates and page layouts..if possible.

Thanks! jasen

Upvotes: 0

Views: 311

Answers (1)

Alper Ebicoglu
Alper Ebicoglu

Reputation: 9634

You can increase max length of AbpSetting value, in your DbContext's OnModelCreating like below;

public class SampleAppDbContext
{
    //..
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        //Increase your Setting Value to 4000 chars
        modelBuilder.Entity<Abp.Configuration.Setting>().Property(u => u.Value).HasMaxLength(4000);
        //..
    }
}

Upvotes: 3

Related Questions