Пример #1
0
        public async Task <HolidayModel> GetAsync(int id, int clientId, int userId)
        {
            if (!await _permissionManager.HasPermission(clientId, userId, Permission.CanViewHoliday))
            {
                throw new Exception("User has not permission to perform this operation");
            }

            return(_holidayMapper.ConvertToModel(await _holidayRepository.GetAsync(id)));
        }