public void Configure(EntityTypeBuilder <Audit> builder) { //builder.ToTable("Audits", "core"); builder.HasKey(e => e.RowId); builder.HasIndex(e => e.CreatedTime); builder.HasIndex(e => e.UserId); builder.HasIndex(e => e.KeyValue); builder.HasIndex(e => e.TableName); builder.HasIndex(e => new { e.UserId, e.KeyValue }); builder.HasIndex(e => new { e.UserId, e.KeyValue, e.CreatedTime }); builder.HasIndex(e => new { e.UserId, e.KeyValue, e.Action }); builder.HasIndex(e => new { e.UserId, e.KeyValue, e.CreatedTime, e.Action }); builder.Property(p => p.RowId) .HasMaxLength(38); builder.Property(p => p.UserId) .HasMaxLength(38); builder.Property(p => p.KeyValue) .HasMaxLength(38);; builder.Property(p => p.TableName) .HasMaxLength(50); builder.Property(p => p.Action) .HasConversion(Enums.ConvertToValue <Enums.Audit.Action>()) .HasMaxLength(10); builder.Property(e => e.CreatedTime) .ValueGeneratedOnAdd(); }