I am implementing a SaaS application using ASP.Net MVC 2 and SQL Server database. I am using Shared Tenancy approach.
To filter data, so far I have found 2 approaches.
Option 1: http://msdn.microsoft.com/en-us/library/aa479086.aspx#mlttntda_tvf
Using sql login per tenant. Thus, using SUSER_SID() as a filter in the views
Option 2: http://blogs.imeta.co.uk/jyoung/archive/2010/03/22/845.aspx
Storing tenant id in the Context_Info. Thus, using a sql function that reads tenant id from the Context_Info as a filter in the views.
Can you please help me pick the appropriate option?
Thanks Thanks