protected override void ConfigureRequestContainer(TinyIoCContainer container, NancyContext context)
        {
            base.ConfigureRequestContainer(container, context);
            container.Register(new NancyContextWrapper(context));
            var appConfig = container.Resolve <IAppConfiguration>();

            container.UseHttpRequestMessageFactory(context, appConfig.IdentityServerConfidentialClientSettings);
            container.RegisterServices(appConfig);

            var configurator = container.Resolve <IPersistenceConfigurator>();

            configurator.ConfigureRequestInstances(container);
        }