using Microsoft.EntityFrameworkCore; using Volo.Abp.Domain.Entities; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.DistributedEvents; namespace DistDemoApp { public class TodoDbContext : AbpDbContext, IHasEventOutbox, IHasEventInbox { public DbSet TodoItems { get; set; } public DbSet TodoSummaries { get; set; } public DbSet OutgoingEvents { get; set; } public DbSet IncomingEvents { get; set; } public TodoDbContext(DbContextOptions options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.ConfigureEventOutbox(); modelBuilder.ConfigureEventInbox(); modelBuilder.Entity(b => { b.Property(x => x.Text).IsRequired().HasMaxLength(128); }); } } }