よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public async Task <IEnumerable <HolidayModel> > QueryAsync(int clientId, int userId) { if (!await _permissionManager.HasPermission(clientId, userId, Permission.CanViewHoliday)) { throw new Exception("User has not permission to perform this operation"); } var holidays = (await _holidayRepository.QueryAsync(clientId)).OrderBy(h => h.StartDate); return(holidays.ToList().Select(p => _holidayMapper.ConvertToModel(p))); }