Esempio n. 1
0
        public async Task <ActionResult <HolidayModel> > Get(int employeeId, int Id)
        {
            try
            {
                var result = await _repository.GetHolidayAsync(employeeId, Id);

                if (result == null)
                {
                    return(NotFound());
                }

                return(_mapper.Map <HolidayModel>(result));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure"));
            }
        }