public async Task Handle(CurrencyCacheAddOrChangeEvent mesage) { try { RCurrency currency = new RCurrency() { Id = mesage.Id, CustomFormatting = mesage.CustomFormatting, DisplayLocale = mesage.DisplayLocale, DisplayOrder = mesage.DisplayOrder, LimitedToStores = mesage.LimitedToStores, Name = mesage.Name, Published = mesage.Published, Rate = mesage.Rate, RoundingTypeId = mesage.RoundingTypeId, }; await _currencyCacheStorage.AddOrChange(currency); } catch (Exception e) { e.Data["Param"] = mesage; throw e; } }
public async Task AddOrChange(RCurrency currency) { await _redisStorage.HashSet(StorageKey, currency.Id, currency); }