コード例 #1
0
        public EmployeeMangementSystemMigrationsDbContext CreateDbContext(string[] args)
        {
            EmployeeMangementSystemEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new EmployeeMangementSystemMigrationsDbContext(builder.Options));
        }
コード例 #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     EmployeeMangementSystemEfCoreEntityExtensionMappings.Configure();
 }