public static IApplicationBuilder InitalizeDatabase(this IApplicationBuilder app)
        {
            if (app == null) throw new ArgumentNullException(nameof(app));

            var messageDispatcher = app.ApplicationServices.GetMessageDispatcher();
            var command = new InitializeDatabaseCommand();

            messageDispatcher.Execute(command);

            return app;
        }
        public static IApplicationBuilder InitalizeDatabase(this IApplicationBuilder app)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }

            var messageDispatcher = app.ApplicationServices.GetMessageDispatcher();
            var command           = new InitializeDatabaseCommand();

            messageDispatcher.Execute(command);

            return(app);
        }
Beispiel #3
0
 protected override void When(TestContext <IMessageDispatcher> context)
 {
     _command = new InitializeDatabaseCommand();
     _result  = context.Service.ExecuteNowWithTimeout(_command);
 }