The Multi Tenant Data Access (MTDA) Blueprint, part of the Software-plus-Services Blueprint program, provides guidance on writing a SQL Server based, single instance, multi-tenant data access layer.
The blueprint consists of:
The base blueprint that generates the scaffolding of the solution and tenant management.
An optional Unit tests blueprint for adding a test project to the solution, with basic fixtures.
An entity definition blueprint to help you create entities with extensible and flexible schemas.
A sample blueprint that demonstrates customization of entity schema and basic queries.
For more information – http://www.codeplex.com/MTDA