public virtual async Task UpdateAsync(DynamicProperty dynamicProperty) { CheckDynamicProperty(dynamicProperty); using (var uow = _unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew)) { await _dynamicPropertyStore.UpdateAsync(dynamicProperty); await uow.CompleteAsync(); } await DynamicPropertyCache.SetAsync(dynamicProperty.Id, dynamicProperty); }
public virtual async Task <DynamicProperty> UpdateAsync(DynamicProperty dynamicProperty) { CheckDynamicProperty(dynamicProperty); using (var uow = _unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew)) { await _dynamicPropertyStore.UpdateAsync(dynamicProperty); await uow.CompleteAsync(); } var cacheKey = GetCacheKey(dynamicProperty.Id, dynamicProperty.TenantId); await DynamicPropertyCache.SetAsync(cacheKey, dynamicProperty); return(dynamicProperty); }