コード例 #1
0
        public async Task <ActionResult <CurrencyForReturnDto> > Update(CurrencyForCreationDto updateDto)
        {
            var currency = await currencyService.Update(updateDto);

            var onlineScreensConnectionId = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreensConnectionId != null && onlineScreensConnectionId.Length != 0)
            {
                var currencyForKisosk = await exchangeRateService.GetExChangeRateAsync();

                if (currencyForKisosk != null)
                {
                    await kiosksHub.Clients.Clients(onlineScreensConnectionId).SendAsync("ReceiveExchangeRate", currencyForKisosk);
                }
            }
            return(currency);
        }
コード例 #2
0
 public async Task <List <ExchangeRate> > Rates()
 {
     return(await exchangeRateService.GetExChangeRateAsync());
 }