Get the source code for this video for FREE → https://the-dotnet-weekly.ck.page/multitenancy
☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic
Most software applications today are built around the concept of multi-tenancy. One application serves multiple customers while keeping their data isolated. You can approach multi-tenancy in two ways:
- Single database and logical isolation of tenants
- Multiple databases and physical isolation of tenants
Which option you decide to use will depend mostly on your requirements. Some industries, like healthcare, require high data isolation, and using a database per tenant is a must. So, how are we going to implement multi-tenancy support with EF Core? We can use Query Filters to apply a tenant filter to all database queries. Implement it once, and you can almost forget about it. I'll show you how in this video.
Check out my courses: https://bit.ly/3PupkOJ
Multi-Tenant Applications With EF Core
https://www.milanjovanovic.tech/blog/multi-tenant-applications-with-ef-core
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Read my Blog here:
https://www.milanjovanovic.tech/blog
Chapters
0:00 What is Multitenancy?
0:41 What happens if we don't filter Tenants
2:07 EF Core Multitenancy: Query Filters
8:59 EF Core Multitenancy: Dynamic Connection Strings