n our wcf service, we are using Multi tenant database we will switch the
database based on user and we are using nhibernate with appfabric for
second level caching when second caching is enabled it is returning the
cached data for different tenant database when the second level caching is
turned off it is working porperly, is there any way to get it work with
multi tenant database with appfabric cache. we are using nhibernate
3.0.0.4000 note: we dont need syscache as it is the memory caching
below is the customprovider to change the tenant based connection string
and changed the provider in configuration
public class ContextAwareConnectionProvider : DriverConnectionProvider{
/// <summary>
/// Gets Database Connection String
/// </summary>
protected override string ConnectionString
{
get
{
//If the TenantConnection string is null,set the master Azure SQL
db which is used for the initial Tenant identification
string tenantConnectionString =
Convert.ToString(ExtendedConstants.TENANTCONNECTIONSTRING);
if (string.IsNullOrEmpty(tenantConnectionString))
{
return base.ConnectionString;
}
return tenantConnectionString;
}
}}
<property
name="connection.provider">MyNamespace.ContextAwareConnectionProvider,Myassembly</property>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.