Magnus Mårtensson
Microsoft Regional Director, Azure MVP, CEO Loftysoft
Avirag Jain
Director & CTO R Systems
Mahesh Chand
Founder C# Corner, CEO Mindcracker
Chris Gali
CEO & Co-Founder Graphite
Subinder Khurana
Chief Architect StoryProcess, Founder NASSCOM DeepTech Club
Bryan Rishforth
Investor, Chairman Graphite
Bryn Everson
Director Biz Dev Graphite
Raj Tiwari
Digital Transformation Leader, Futurist and Visionary
Joseph Guadagno
Microsoft MVP, Lead Quicken Loans
Nikita Sachdev
Entrepreneur, Blockchain Enthusiast & Advisor, Social Media Influencer
Doug Wagner
COO & Founder Adapt Technical Group
Ritesh Modi
Architect, Senior Evangelist, Cloud Architect
Crystal Wenrick
Director Communications Mindcracker
Allen O’Neill
Microsoft MVP, Consulting Engineer/Architect
Praveen Kumar
CEO MCN Solutions
Chris Love
Founder Love2Dev, Microsoft MVP, Author
Sanjay Vyas
Microsoft Regional Director, Microsoft MVP, Founder & CEO SkillLabs Technologies
Veena Sarda
Deep Learning Consultant, Author
Sekhar Srinivasan
C# Corner MVP, Microsoft Certified Trainer, Pluralsight Author
Lalit Bansal
Founder & CEO - EIY SYS
Navdeep Garg
CEO Revinfotech
Prakash Tripathi
Tech Manager/Leader, Microsoft MVP, Blogger
Bhavna Jain
Breakthrough Consultant
Naveen Sharma
Enterprise Architect, Leadership Coach, Author
Vidya Vrat Agarwal
Principal Architect, Microsoft MVP, Author
Sheetal Agarwal
Founder Clownselors, Medical Clown, Trainer
Abhishek Kant
Founder GTM Catalyst
Vishnu Saran
Founder & CEO VoiceQube
Sandeep Soni
Founder & CEO Deccansoft, Microsoft Certified Trainer
Parveen Malik
AVP InfoSec & Vulnerability Management, Information Security Expert
Nitin Pandit
Microsoft MVP, Developer Evangelist, Author
Niloshima Srivastava
C# Corner MVP, Tech Architect, Trainer, Blogger
Bala Chirtsabesan
Senior Software Engineer at Microsoft, Author
Manoj Mittal
Sr. Technical Architect, C# Corner MVP, Author
Chandni Di
Co-Founder Voice of Slum
Vithal Wadje
Technical Lead, Microsoft MVP, Author
Shivam Ahuja
Founder SkillCircle, Business Mentor
Chervine Bhiwoo
Solution Architect, Microsoft MVP, Author
Saurabh Jain
Vice President Paytm, Founder Fun2Do Labs, Author
Vinay Solanki
Head IoT at Lenovo, Founder IoT-NCR
Anshu kumari
Founder Blockchainkids, Inventor, Trainer
Amit Singal
CEO Startup Buddy
Dev Pratap
Co-Founder & CEO Voice of Slum
Amey Vartak
Technology Consultant, Full Stack Developer, C# Corner MVP, Author
Viswanatha Swamy
Principal Software Engineer, C# Corner MVP, Author
Sanket Verma
Research Engineer @ Ballistics (Forensics) and Chair, PyData Delhi
Sourabh Somani
Lead Developer, Microsoft MVP, Author
Abhishek Mishra
Software Architect, C# Corner MVP, Author
Siddharth Vaghasia
Technical Consultant, C# Corner MVP, Blogger
Bassam Alugili
Senior Software Specialist, Database Expert
S Ravi Kumar
Solution Architect, C# Corner MVP, Author
Sundaram Subramanian
Full Stack Developer, C# Corner MVP, Speaker
Deepesh Somani
Solution Architect, Microsoft MVP, Author
Debasis Saha
Technical Project Manager, C# Corner MVP, Blogger, Author
Vipul Jain
Software Architect, C# Corner MVP, Author
Akshay Patel
Technical Architect, Microsoft Certified Trainer, C# Corner MVP, Author
Stephen Simon
RPA Developer, Evangelist, Author
Vivek Sharma
Founder Kingster636, AR/VR Specialist
Jeetendra Gund
Technical Lead, C# Corner MVP, Author
Sujal Beniwal
AI Enthusiast, Student
M Viknaraj
Microsoft MVP, Azure Architect, Author
Prasham Sabadra
Software Architect, C# Corner MVP, Trainer, Author
Aakash Maurya
Senior Developer, C# Corner MVP, Speaker
Ankit Sharma
Senior Software Engineer, C# Corner MVP, Author
Mangesh Gaherwar
Team Lead, C# Corner MVP, Author
Viral Jain
Technical Consultant, C# Corner MVP, Author
Bhasker Das
Solution Architect, Evangelist
Manish Dwivedi
Associate Project Manager
Ck Nitin
Programmer, Author
Rohit Gupta
Technical Trainer, Author
Manish Tewatia
Full-stack Marketer, UX Designer
Bhavya Gaur
Technical Illustrator
Rohit Tomar
SEO/SMO Expert
Web Track
Cloud & Data Track
Dev Track
Registration & Breakfast
Future of Desktop Apps with JS (ElectronJs)
Nitin Pandit
Building Serverless Microservices Using Microsoft Azure
Vithal Wadje
Innovating RPA: A Robot for Every Person
Stephen Simon
Managing Cloud Storage Accounts using Logic Apps
Viknaraj Manogararajah
Data visualization using Python
Sekhar Srinivasan
Going Cross platform with AR Foundation
Vivek Sharma
Keynote
Managing your Azure dependencies in ASP.NET Core apps using VS
Bala Chirtsabesan
Securing Applications on Intelligent Azure
Abhishek Mishra
Getting started with Blazor the Framework of Future
S Ravi Kumar
Lunch
Build Progressive Web Apps using Angular 9
Debasis Saha
Build and deploy to any platform using Azure DevOps
Chervine Bhiwoo
Deep Dive in Azure Service Bus
Akshay Patel
Build a Native Mobile Application using React Native and JavaScript
Joseph Guadagno
Making sense of Web Job, Web Job SDK and Functions in Azure
Prakash Tripathi
CloudFront Distribution in AWS
Viral Jain
Tea Break
Introduction to PowerBI
Aakash Maurya
Build Advanced SPFx solutions with React and Graph API
Siddharth Vaghasia
Build Business Intelligence Analyst (BIA) Skills
Sundaram Subramanian
Deep dive of Power Platform – AI BUILDER
Prasham Sabadra
Panel 1
What's new in SharePoint development
Vipul Jain
Build a SSO (Single Sign On) based Native JavaScript application with Microsoft Identity within 10 minutes
Manoj Mittal
Panel 2
Applications and working of AI
Veena Sarda
Deploying serverless API's with .Net core 3.0 on AWS & Azure
Amey Vartak
Panel 3
Blockchain with .NET Core (Ark)
Anshu Kumari
Closing Note & Prize Distribution
Dev Track
Cloud Track
Architecture Track
Emerging Tech Track
Registration & Breakfast
Creating Full-Stack Web Apps Using Server-Side Blazor
Ankit Sharma
Real time face recognition with MS Cognitive Services
Niloshima Srivastava
Building Scalable APIs with GraphQL
Jeetendra Gund
Future of development with AI and Blockchain
Navdeep Garg
Debugging Tips and Tricks with Visual Studio 2019
Joseph Guadagno
Azure Containers
Abhishek Kant
Enterprise Architecture
Naveen Sharma
Bot Framework - learn it fast and look like a boss!
Allen O’Neill
Keynote
.Net Core & C# 8 Performance
David McCarter
Working with Azure kubernetes services
Ritesh Modi
Becoming an Architect
Vidyavrat Agarwal
Why Techies Need to Learn Product Management
Saurabh Jain
Lunch
Build a rules engine in .Net Core
Sanjay Vyas
Building CI and CD Pipeline using Azure DevOps
Sandeep Soni
Entity Framework Core - Tips and Tricks, Performance Optimization, and Tuning
Bassam Alugili
Hacking your way into Data Science
Sanket Verma
Speed up your .Net Core Website
Sourabh Somani
Azure
Magnus Mårtensson
Demystifying Open Distro for Elasticsearch
Suman Debnath
Future of Data
Shivam Ahuja
Tea Break
gRPC with C# and .Net Core
Mangesh Gaherwar
Panel 1
Essentials of Cloud security
Parveen Malik
Power platform and Dynamics 365
Deepesh Somani
Microservices - the gRPC Way
Viswanatha Swamy
Panel 2
Reserved
Reserved
Closing Note & Prize Distribution
Implementing multi-tenancy in EF Core with global filters
The C# Corner Annual Conference 2020 program brings C#, Azure, data and DevOps specialists together, yet many production applications still have a deceptively small requirement: keep each customer’s records separate. In a multi-tenant system, one account may represent a law firm in Brisbane and another a retailer in Melbourne, while both use the same application, schema and operational pipeline.
EF Core global query filters can make tenant isolation the default by adding a tenant discriminator to ordinary LINQ queries. They are valuable, but a filter alone is not a security boundary: tenant identity, entity keys, authorisation, migrations and tests must reinforce it. The practical goal is a design where ordinary application code asks for “accounts” and receives only the accounts owned by the current tenant.
Define the tenancy boundary
Begin with the isolation promise rather than the number of tenants. Decide whether customers share a database schema, use separate schemas in one database, or receive dedicated databases. Global filters fit the first model naturally, but they can also protect accidental access in carefully controlled hybrids. A tenant means a contractual customer organisation, not an individual user or subscription plan.
| Storage model | Data placement | EF Core pattern | Operational trade-off |
|---|---|---|---|
| Shared database and schema | Tenant key on each owned table | Scoped context plus global filters | Lowest cost; shared-schema safeguards are critical |
| Separate schemas | One database, tenant-specific namespaces | Schema and mapping selected per tenant | Stronger logical separation; more connection management |
| Separate databases | A database and context per tenant | Explicit connection routing | Highest isolation; migration and scaling overhead |
A shared schema usually offers the best economics for Australian SaaS businesses serving many small and medium-sized customers. Melbourne and Sydney firms often operate lean engineering teams, so pooling resources can control database and administration costs. It also suits usage patterns built around cloud APIs, where customers expect fast, always-available access without maintaining separate estates.
Regulated or larger customers may request a dedicated database for contractual, risk or capacity reasons. That choice is separate from Australian privacy law: the Privacy Act 1988 and the Australian Privacy Principles govern how personal information is handled, but they do not generally prescribe one tenant per database. Document the chosen boundary, customer entitlements and migration path before writing filters.
Resolve tenant identity for each request
EF Core evaluates a query filter as part of each LINQ expression. The context therefore needs a reliable tenant identifier before any tenant-owned query runs. Resolve it from a validated membership claim after authentication, place it in a scoped tenant context, and bind it to the DbContext for that request. Never trust a tenant ID supplied only in JSON, a query string or an unsigned header.
public interface ITenantContext
{
Guid TenantId { get; }
}
public sealed class AppDbContext : DbContext
{
private readonly ITenantContext _tenant;
public AppDbContext(DbContextOptions<AppDbContext> options,
ITenantContext tenant) : base(options)
{
_tenant = tenant;
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Account>()
.HasQueryFilter(x => x.TenantId == _tenant.TenantId);
}
}
Scoped registration prevents one user’s tenant from leaking into another request through a singleton context. In ASP.NET Core, complete authentication and tenant selection before the first database call. If a user can belong to several organisations, make tenant selection explicit and verify that the chosen tenant appears in the signed membership claim. Cache tenant metadata, not the tenant decision itself.
Workers need deliberate tenant boundaries too. A queue message can carry a tenant ID, but the consumer should validate it against the target record before creating the scoped context. Use a separate, audited administrative path for support access, and record who switched context and why. Calling IgnoreQueryFilters is appropriate for that path, not as a convenient way to repair an incorrect normal request.
Encode ownership in the EF model
Filtering reads is only part of ownership. Model tenant-owned entities with the tenant key in their primary key and relevant unique indexes. A bare integer primary key can remain unique, while a compound key expresses that the same local identifier may exist in several tenants. Unique business fields, such as an email address or ABN, must be unique within a tenant rather than across the entire platform.
modelBuilder.Entity<Account>()
.HasKey(x => new { x.TenantId, x.Id });
modelBuilder.Entity<Account>()
.HasIndex(x => new { x.TenantId, x.Email })
.IsUnique();
Global filters scope query roots, but they are application-side filtering rather than database row-level security, and they do not decide whether the current user may perform an operation. Add authorisation policies for roles and tenant membership, and validate newly attached or modified entities during SaveChanges. An interceptor can reject tracked changes whose TenantId differs from the active context. This protects against code that retrieves an entity through an unfiltered path and then saves it.
Navigation properties deserve specific tests. Global query filters apply to the top-level entity in a LINQ query; they do not automatically apply a navigation entity’s own filter when that navigation is included. Validate required relationships in memory or query them with an explicit tenant predicate. If soft deletion also matters, compose both conditions in the filter, and test a deleted record that is reached through an active parent.
Test isolation and meet local obligations
Tenant isolation needs a test matrix that deliberately crosses boundaries. Create two tenants with identical local identifiers, then verify reads, updates, deletes, Include operations, aggregates and background jobs cannot cross them. Seed each test database deterministically and run the matrix in CI. Add a test that creates a scoped context without a tenant, because an empty or default GUID should fail loudly rather than widen a query.
For Australian deployments, personal information requires more than row separation. The Privacy Act 1988, Australian Privacy Principles and applicable state instruments such as NSW’s Privacy and Personal Information Protection Act 1988 or Victoria’s Privacy and Personal Information Protection Act 2016 can shape collection, purpose, access correction and retention decisions. The Notifiable Data Breaches scheme also makes containment and evidence important. Global filters can reduce accidental disclosure, while access controls, audit trails and incident procedures address the wider legal obligations.
Local infrastructure choices matter as well. Australian organisations commonly mix Microsoft Azure with AWS and Google Cloud, with Sydney, Melbourne and Brisbane hosting requirements influencing latency and resilience. The Privacy Act does not create a blanket Australian data-residency rule, but contracts and regulator expectations may still require specific storage locations. Keep the tenancy model independent of the database vendor so dedicated or regional deployments remain possible.
Everyday expectations are equally concrete: commuters checking mobile banking, retail loyalty and booking apps assume a signed-in account cannot expose another household’s data. The Australian Signals Directorate’s Essential Eight adds a useful security baseline through application allow-listing, patching, MFA, logging and privileged-access controls. These measures limit the blast radius of a compromised account when support staff operate across shared infrastructure.
Design for cloud operations
Runtime correctness must extend into cloud operations. Give cached values, queued commands and idempotency keys tenant-qualified identities, and use an outbox or equivalent mechanism to publish events only after the transaction commits. Retries must not create a second tenant-owned record. Distributed tracing should include a pseudonymous tenant identifier, enough to diagnose failures without copying personal information into logs.
A resilient Azure architecture can guide health checks, retry policies, service communication and failure isolation when tenant-aware workloads become microservices. Multi-tenancy does not replace those patterns; it adds an ownership dimension to them. A retrying service needs the same tenant context and idempotency controls as its first attempt.
Database changes require a deployment plan. For a shared-schema move, add and backfill tenant columns before enforcing keys, then introduce filters and compatibility code in stages. EF Core migrations should create the new shape safely for live traffic, while blue-green deployment can keep old and new application versions operating against the same transition schema. Dedicated databases need an orchestration process for provisioning, migration and tenant movement.
Roll out with measurable safeguards
Treat the implementation as a staged change with observable outcomes. Establish the ownership model and threat cases first, prove isolation in an integration environment, and release with dashboards that track query volume, denied cross-tenant attempts, migration errors and tenant-specific latency. A rollback must preserve data boundaries; restoring a backup needs the same tenant mapping and access checks as the original system.
- Define tenant ownership, key strategy and dedicated-instance criteria before changing the schema.
- Derive tenant context from validated identity and membership claims, with an explicit elevated-access path.
- Exercise every query, navigation, write path and worker against at least two tenants in automated tests.
- Roll out migrations with backfill checks, tenant-level telemetry and rehearsed rollback procedures.
Used this way, global query filters become a consistent default rather than a stand-alone safeguard. The C# Corner Annual Conference 2020 mix of C#, Azure, data, DevOps and AI sessions reflects the same reality: tenant isolation spans application code, cloud operations and governance. A design that combines deterministic context, enforced model rules, Australian privacy controls and continuous verification can scale from a shared Australian SaaS deployment to customers with dedicated infrastructure.
1, CBD, Maharaj Surajmal Road, Near Yamuna Sports Complex, Delhi, 110032
GENERAL QUERIES
Manish Tewatia
manish@csharpcon.com
+91-9718-431-042
TICKET QUERIES
Atul Gupta
conference@csharpcon.com
+91-9910-125-804