示例#1
0
        public async Task <ActionResult <VoucherModel[]> > GetAll(int accountId)
        {
            try
            {
                var results = await _repository.GetAllVouchersAsync(accountId);

                return(_mapper.Map <VoucherModel[]>(results));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure"));
            }
        }