public override void Configure(Container container) { // I add some request/response filters to set up the correct database // connection for the integration test database RequestFilters.Add((httpRequest, httpResponse, requestDto) => { var dbContext = MakeSomeDatabaseContext(); httpRequest.Items["DatabaseIntegrationTestContext"] = dbContext; }); ResponseFilters.Add((httpRequest, httpResponse, responseDto) => { var dbContext = httpRequest.Items["DatabaseIntegrationTestContext"] as DbContext; if (dbContext != null) { dbContext.Dispose(); httpRequest.Items.Remove("DatabaseIntegrationTestContext"); } }); // now include any configuration you want to share between this // and your regular AppHost, e.g. IoC setup, EndpointHostConfig, // JsConfig setup, adding Plugins, etc. SharedAppHost.Configure(container); }
public override void Configure(Container container) => SharedAppHost.Configure(this);