Esempio n. 1
0
        public async Task <ListLotteryResponse> ListLotteryAsync(bool active)
        {
            ListLotteryResponse response = new ListLotteryResponse
            {
                ListLotteries = await _lotteryRepository.ListLotteriesAsync(active)
            };

            return(response);
        }
Esempio n. 2
0
        public async Task <IActionResult> ListLotteries(bool active)
        {
            ListLotteryResponse response = await _lotteryService.ListLotteryAsync(active);

            if (response.IsValid())
            {
                return(Ok(response));
            }

            return(BadRequest(response.GetErrors()));
        }