In response to a common customer question, we've published a short tutorial showing how to use Row-Level Security with Entity Framework.
The tutorial extends an existing ASP.NET MVC app to support a "
shared database, shared schema
" tenancy model. In this model, a single database contains data for many tenants, and each row in each table is associated with a "Tenant ID." Row-Level Security (RLS) is used to prevent tenants from accessing each other's data. This requires just a single, small change to the application. By centralizing the tenant access logic within the database itself, RLS simplifies the application code and reduces the risk of accidental data leakage between tenants.