protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); this.FixOnModelCreating(modelBuilder); ExternalCheckModel?.Invoke(modelBuilder); }
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); IEntityType et = modelBuilder.Model.GetEntityTypes().First(); Debug.WriteLine($"ClrType={et.ClrType} from {et.ClrType.GetTypeInfo().Assembly.FullName}"); Debug.WriteLine($"GetType()={et.GetType()} from {et.GetType().GetTypeInfo().Assembly.FullName}"); this.FixOnModelCreating(modelBuilder); ExternalCheckModel?.Invoke(modelBuilder); }
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); // manual changes var er = modelBuilder.Model.GetEntityTypes() .Single(a => a.ClrType == typeof(MyEntityWithDifferentTableName)); er.Relational().TableName = "ManualChange"; this.FixOnModelCreating(modelBuilder); ExternalCheckModel?.Invoke(modelBuilder); }