public IActionResult EventDetails(EventDetailsViewModel eventDetails)
 {
     eventDetails.Event            = _eventRepository.GetEventById(eventDetails.EventId);
     eventDetails.EventCategory    = _eventCategoryRepository.GetCategoryById(eventDetails.Event.EventCategoryId);
     eventDetails.EventSubCategory = _eventSubCategoryRepository.GetSubCategoryById(eventDetails.Event.EventSubCategoryId);
     eventDetails.Venue            = _venueRepository.GetVenueById(eventDetails.Event.VenueId);
     eventDetails.Image            = _imageRepository.GetImage(eventDetails.EventId);
     eventDetails.Rsvp             = new Rsvp {
         EventId = eventDetails.EventId
     };
     eventDetails.Comments   = _commentRepository.GetCommentsForEvent(eventDetails.EventId);
     eventDetails.NewComment = new Comment {
         EventId = eventDetails.EventId
     };
     eventDetails.RatingAverage = _ratingRepository.GetAvgRating(eventDetails.EventId);
     if (eventDetails.UserLimitReached)
     {
         ViewData["Message"] = "Sva mjesta za ovaj događaj su popunjena.";
     }
     if (eventDetails.DuplicateUser)
     {
         ViewData["Message"] = "Već ste se prijavili za ovaj događaj.";
     }
     return(View(eventDetails));
 }