示例#1
0
        public async Task Invoke(HttpContext context, IConnectionStringResolver connectionStringResolver)
        {
            var  connectionStringHeaders    = "databaseSandboxConnection";
            bool hasConnectionStringHeaders = context.Request.Headers.ContainsKey(connectionStringHeaders);

            if (hasConnectionStringHeaders)
            {
                connectionStringResolver.Set(context.Request.Headers[connectionStringHeaders]);
            }
            await _next.Invoke(context);
        }