Learn how to build a Multi-Tenant SaaS App using ASP.NET and Entity Framework Core. In less than 20 minutes understand the essential components that make up multi-tenant architecture using query filters and middleware. Multi-tenant architecture is essential for any SaaS or modern web application.
VIDEO PART 2:
https://youtu.be/Q-CI5SeCaT8
VIDEO PART 3 (deploy to Azure):
https://youtu.be/Li86oRPuq5g
TUTORIAL / SAMPLE CODE :
PART 1: https://aspnano.com/build-multi-tenant-application-core-asp-net-7/
PART 2: https://aspnano.com/asp-net-core-multi-tenant-app-multiple-databases-guide/
NANO ASP.NET BOILERPLATE:
https://aspnano.com/
VIDEO TOUR:
https://www.youtube.com/watch?v=NMw-LXOtr2c
0:00 - Intro
0:42 - Set up CRUD application
5:35 - Begin Multi-Tenant Architecture (create tenant entity)
7:29 - Create IMustHaveTenant Interface
8:06 - Create Initial Migration
8:57 - Resolving Tenants in Request Header
10:20 - Middleware Tenant Resolver
11:16 - Scoped Service currentTenantService
13:07 - Modify ApplicationDbContext
14:05 - Add query filter in OnModelCreating
14:41 - Issue with Circular Dependency
15:23 - Create TenantDbContext
16:48 - Modify the Context in CurrentTenantSerice
17:01 - Run the App and Test with Postman
18:41 - Review the Request Flow with Breakpoints
21:20 - More Resources