protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            this.FixOnModelCreating(modelBuilder);
            ExternalCheckModel?.Invoke(modelBuilder);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }