Exemplo n.º 1
0
        protected override Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var virtualPathRoot = request.GetRequestContext().VirtualPathRoot;

            ContextualKeyRoutingConnectionProvider.CurrentRoutingKey = MultiTenancyUtils.GetConnectionRoutingKey(request.RequestUri, virtualPathRoot);

            return(base.SendAsync(request, cancellationToken));
        }
Exemplo n.º 2
0
        public override async Task Invoke(IOwinContext context)
        {
            var request = context.Request;

            ContextualKeyRoutingConnectionProvider.CurrentRoutingKey = MultiTenancyUtils.GetConnectionRoutingKey(request.Uri, null);

            await Next.Invoke(context);
        }