Пример #1
0
 public Startup(IConfiguration configuration, IWebHostEnvironment env)
 {
     Configuration = configuration;
     Croco         = new StartupCroco(new StartUpCrocoOptions
     {
         Configuration      = configuration,
         Env                = env,
         ApplicationActions = new List <Action <ICrocoApplication> >
         {
             ApplicationServiceRegistrator.Register
         },
     });
 }
Пример #2
0
        public Startup(IConfiguration configuration, IWebHostEnvironment env)
        {
            Configuration = configuration;
            Croco         = new StartupCroco(new StartUpCrocoOptions
            {
                Configuration      = configuration,
                Env                = env,
                ApplicationActions = new List <Action <ICrocoApplication> >
                {
                    //Первым должно проверяться состояние миграций
                    CrocoMigrationStateChecker.CheckApplicationState,

                    //Только затем регистрация сервисов
                    EccServiceRegistrator.Register,
                    ApplicationServiceRegistrator.Register
                },
            });
        }