Exemple #1
0
        public YCMigrationsDbContext CreateDbContext(string[] args)
        {
            YCEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <YCMigrationsDbContext>()
                          .UseSqlServer(configuration.GetConnectionString("Default"));

            return(new YCMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     YCEfCoreEntityExtensionMappings.Configure();
 }