Ejemplo n.º 1
0
        public override void EnsureSeeded()
        {
            var csvConfig = new CsvConfiguration
            {
                SkipEmptyRecords        = true,
                TrimFields              = true,
                TrimHeaders             = true,
                WillThrowOnMissingField = false
            };

            SeederConfiguration.ResetConfiguration(csvConfig, null, typeof(SettingsContext).GetTypeInfo().Assembly);

            TestCars.SeedDbSetIfEmpty($"{nameof(TestCar)}");
            TestModels.SeedDbSetIfEmpty($"{nameof(TestModel)}");

            base.EnsureSeeded();
        }
Ejemplo n.º 2
0
 public override void EnsureSeeded()
 {
     TestCars.SeedDbSetIfEmpty($"{nameof(TestCar)}");
     TestModels.SeedDbSetIfEmpty($"{nameof(TestModel)}");
     base.EnsureSeeded();
 }