public IActionResult Details(int id) { var eventFromId = eventService.GetEventById(id); if (eventFromId == null) { return(RedirectToAction("Error", "Home")); } var guestOfEvent = guestService.GetGuestsForAnEvent(eventFromId.Id).ToList(); return(View(new EventGuestsModel() { EventModel = new EventModel().InjectFrom(eventFromId) as EventModel, Guests = guestOfEvent.Select(x => new GuestModel().InjectFrom(x) as GuestModel) })); }