title: Unique UserName & Email per tenant
body: <p>I'm coding a multi-tenant app using <code>ASP.NET Core 2.1</code>.</p>
  
  <p>I would like to override the default user-creation-related validation mechanism.</p>
  
  <p>Currently I cannot create several users with the same <code>UserName</code>.</p>
  
  <p>My <code>ApplicationUser</code> model has a field called <code>TenantID</code>.</p>
  
  <p>What I'm trying to achieve: <code>UserName</code> &amp; <code>EmailAddress</code> must be unique per tenant.</p>
  
  <p>I've been googling a solution, but haven't found much info for <code>asp.net core</code> on this one.</p>
  
  <p>Most of the results would only cover <code>Entity Framework</code> aspects, as if it's just a matter of <a href="https://github.com/aspnet/Identity/issues/1518" rel="noreferrer">overriding</a> <code>OnModelCreating(...)</code> method. <a href="https://stackoverflow.com/questions/29628850/microsoft-asp-net-identity-multiple-users-with-the-same-name">Some</a> are related to NON-core edition of ASP.NET Identity.</p>
  
  <p>I wonder if I should keep investigating <code>OnModelCreating</code> approach?</p>
  
  <p>Or perhaps, there's something else that needs to be overridden around <code>Identity</code>?</p>