title: What's the best way to pass tenant id through an application in a Multi Tenant Architecture
body: <p>Our company has a multi tenant asp.net web application. The application is 3 tier e.g. website,business and dataaccess. We hold the tenant id in session after the user logs in.</p>
  
  <p>When we need to get a list of 'customers or orders' we pass the tenant id from the website to the business to the data access and then to the database (and query for customers or orders for that tenant). (almost every business function takes tenantId as a parameter)</p>
  
  <p>Sometimes when creating new functions developers forget to add the tenant id from the website to the database, causing a security issue.</p>
  
  <p>Is there a way we could do this so that the developers dont need to always remember to pass the tenant id.</p>
  
  <p>Any suggestions on how best to resolve this issue.</p>