title: Multi-tenant ASP.NET Core Web Application, how to restrict multiple tabs to the same tenant?
body: <p>My admin system allows the user to select a tenant at any time, the admin page then redirects to the admin home page for the selected tenant.  The user can then continue to maintain the tenant customer records.</p>
  <p>My worry is that the user will open tab 1 and start editing a customer in tenant A.  Then in another tab (2) select tenant B.  If the user in tab 1 then saves the edit it will be saved in tenant B (assuming id's match) or throw an error.</p>
  <p>Ideally, I would like a solution that will stop the user posting their change in tab 1 and redirect to the tenant B home page.</p>
  <p>More information... the admin app uses a scoped tenant class that has a connection string in it, when an organisation is selected its id is saved in a cookie.  Middleware on each request examines the cookie and sets the tenant connection string based on the cookie tenant id.  Tenant connection string is used by the repositories to pull in data from different tenants.</p>