Esempio n. 1
0
        public static void InitializeApplication(CommandOptions options)
        {
            if (options.IsValid())
            {
                var appSettings = AppInitializer.BindAndGetAppSettings(options.Environment);

                LoggerUtility.ConfigureSeriLog();

                var serviceProvider = CreateServices(appSettings, options);

                // Put the database update into a scope to ensure
                // that all resources will be disposed.
                using (var scope = serviceProvider.CreateScope())
                {
                    UpdateDatabase(scope.ServiceProvider, options);
                }
            }
        }