I have a standard DbContext
with code like the following:
public DbSet Interests { get; set; }
public DbSet Users
Just wanted to offer an alternative approach to implementing multi-tenancy, which is working really well in a current project, using EF5 and SQL 2012. Basic design is (bear with me here...):
WHERE (ClientSid = SUSER_SID())
but doesn't select the ClientSid (effectively exposing the interface of the table)That's pretty much it - though it might be useful to share. I know it's not a direct answer to your question, but this has resulted in basically zero custom code in the C# area.