public async Task <ActionResult <ParticipantsDTO[]> > GetAllEventsWithParticipants() { try { var eventsParticipants = await _participantsRepository.GetAllEventsWithParticipantsAsync(); return(Ok(_mapper.Map <ParticipantsDTO[]>(eventsParticipants))); } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure")); } }