Skip to content

Latest commit

 

History

History

implementing-multitenancy-in-entity-framework-core-6-using-a-database-per-tenant

Implementing Multitenancy in Entity Framework Core 6 using a Database Per-Tenant

YouTube

Getting Started

  1. Generate a self-signed certificate.
    openssl req -x509 -nodes -newkey rsa:4096 -keyout example.local.key -out example.local.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,DNS:*.example.local"
    openssl pkcs12 -export -in example.local.crt -inkey example.local.key -out example.local.pfx -name "Implementing Multitenancy in Entity Framework Core 6 using a Database Per-Tenant"
  2. Import the self-signed certificate.
    certutil -f -user -importpfx Root example.local.pfx
  3. Add the lines below to the hosts file.
    127.0.0.1 one.example.local
    127.0.0.1 two.example.local
    
  4. Start the services.
    docker compose up --build