예제 #1
0
 /// <inheritdoc />
 public QuerySqlGenerator Create()
 {
     return(new ThinktectureSqlServerQuerySqlGenerator(_dependencies, _databaseProviderFactory.Create()));
 }
예제 #2
0
        /// <summary>
        /// Adds a parameter so EF query cache treats queries for different tenants as different queries.
        /// </summary>
        /// <param name="ctx"></param>
        private void AddTenantParameter(IParameterValues ctx)
        {
            var tenantDatabaseProvider = _tenantDatabaseProviderFactory.Create();

            ctx.AddParameter($"{_TENANT_PARAM_PREFIX}|{tenantDatabaseProvider.Tenant}", null);
        }