public IActionResult GetInterestPointById(int idInterestPoint) { InterestPointWithVote interestPointWithVote = Context.InterestPoint .Include(a => a.Description) .ThenInclude(a => a.VoteDescription) .Include(a => a.VoteInterestPoint) .Include(a => a.IdUserNavigation) .Where(a => a.IdInterestPoint == idInterestPoint) .Select(ip => new InterestPointWithVote() { InterestPoint = ip, Average = calculateAverage(ip) }) .SingleOrDefault(); if (interestPointWithVote == null) { return(NotFound()); } return(Ok(interestPointWithVote)); }
public void OnNavigatedTo(NavigationEventArgs e) { SelectedInterestPoint = (InterestPointWithVote)e.Parameter; GetAllDescriptionsByServiceAsync(); }