Global Query Filters for Interfaces

added by DotNetKicks
7/30/2019 12:31:17 PM

2 Kicks, 189 Views

This post describes how to apply an Entity Framework Core Global Query filter on all entity types that implement an interface using a strongly typed expression. And why you might want to do that in the first place. One way to implement a multi-tenant application is to use a discriminator column (aka a tenant_id column on every table).