- Wed Jun 13, 2018 7:13 am
I made TenantaCacheExtended:
Code: Select all
public class TenantaCacheExtended : TenantCache<Tenant, User>
IUnitOfWorkManager unitOfWorkManager) : base(cacheManager, tenantRepository, unitOfWorkManager)
protected override TenantCacheItem CreateTenantCacheItem(Tenant tenant)
return new TenantCacheItem
Id = tenant.Id,
Name = tenant.Name,
TenancyName = tenant.TenancyName,
EditionId = tenant.EditionId,
ConnectionString = SimpleStringCipher.Instance.Decrypt(tenant.ConnectionString),
IsActive = tenant.IsActive,
CustomData = SimpleStringCipher.Instance.Decrypt(tenant.AzureStorageConnectionString),
and it is located in Core project, same place where Tenant class is.
I tried to add IocManager.Register<ITenantCache, TenantaCacheExtended>(DependencyLifeStyle.Transient);
to Core modules Initialize, PostInitialize and finally Application modules Initialize methods, but class is not being used. I had breakpoint at line "return new TenantCacheItem" but it newer got fired.
At the method where this custom data is supposed to be read, it is null.