예제 #1
0
        public async Task <ActionResult <CityForReturnDto> > Update(CityForCreationDto updateDto)
        {
            var city = await cityService.Update(updateDto);

            var onlineScreens = await onlineScreenService.GetAllOnlineScreenConnectionId();

            if (onlineScreens != null && onlineScreens.Length != 0)
            {
                var foreCastsForKiosks = await wheatherForeCastService.WheatherForeCastsAsync();

                if (foreCastsForKiosks != null)
                {
                    await kiosksHub.Clients.Clients(onlineScreens).SendAsync("ReceiveWheatherForeCast", foreCastsForKiosks);
                }
            }
            return(city);
        }
예제 #2
0
 public async Task <List <WheatherForeCastForReturnDto> > GetWheather()
 {
     return(await wheatherForeCastService.WheatherForeCastsAsync());
 }