예제 #1
0
        public async Task <ActionResult <IEnumerable <BonusDto> > > ListOfBonuses()
        {
            try
            {
                var listOfBonus = await _bonusRepository.GetAllBonusAsync();

                return(Ok(listOfBonus));
            }
            catch
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, new Response {
                    Success = false, Message = "Server Error"
                }));
            }
        }