public async Task <IActionResult> GetEvent(Guid id) { //vanuit repo één event halen adhv id var eventobj = await _context.GetAsync(id); if (eventobj == null) { _logger.LogCritical($"event not found: {id} is not a valid id"); return(NotFound()); } //opgehaalde event mappen naar een EventDTO return(Ok(_mapper.Map <Event, EventDTO>(eventobj))); }
// GET: Event/Details/5 public async Task <ActionResult> Details(Guid id) { var eventobj = await eventRepo.GetAsync(id); return(View(eventobj)); }
// GET: api/Events/5 public async Task <Event> GetEvent(int id) { var e = await _eventRepo.GetAsync(id); return(e); }