First published on MSDN on Nov 04, 2015
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.
Full walkthrough : Tutorial: Web app with a multi-tenant database using Entity Framework and Row-Level Security
Updated Mar 23, 2019
Version 2.0SQL-Server-Team
Microsoft
Joined March 23, 2019
SQL Server Blog
Follow this blog board to get notified when there's new activity