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

            var configuration = BuildConfiguration();

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

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