public async Task <IActionResult> GetEventByID(int eventId) { Log.Information("EventsController: HTTP GET events/{eventId}", eventId); var result = await _eventServices.GetEventAsync(eventId); if (result == null) { return(NotFound()); } var item = _mapper.Map <Event, EventReadDto>(result); String hrefUrl = $"{ Request.Scheme.ToString() }://{ Request.Host.ToString() }{ Request.Path.ToString() }/atendees"; item.Links.Add(new LinkReadDto { Href = hrefUrl, Ref = "atendees", Type = "GET" }); return(Ok(item)); }