Session

Stop Repeating Your Where Clause: Meet EF Core Global Query Filters

How many times have you written the same Where clause in your EF Core queries?

Soft deletes. Multi-tenant filtering. “Only active” records. We copy and paste the same conditions across repositories, services, and controllers — hoping we don’t forget one.

EF Core has a built-in feature that can automatically apply those filters to every query: Global Query Filters.

In this lightning talk, you’ll learn what Global Query Filters are, how to configure them in just a few lines of code, and when they make your codebase dramatically cleaner. We’ll walk through a simple example (soft deletes and tenant isolation), see how the filter is applied automatically, and look at the one thing you must know to avoid surprises.

If you’re using EF Core and repeating filtering logic throughout your application, this talk will give you a simple, practical tool you can use immediately.

Johnie Karr

Sr. Software Engineer, Hygiena

London, Kentucky, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top