public async Task <ParkEventModel> GetParkEventModelByIdAsync(int eventId, int?parkId = null) { var result = await _parkRepository.GetEventByIdAsync(eventId); if (result == null) { return(null); } if (parkId != null && result.Park.ParkId != parkId) { return(null); } return(_mapper.Map <ParkEventModel>(result)); }