© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
10 replies
Murilo Barbosa

NullReference Exception

Hello,

I have this application that retrieves data from the TMDB API, but when I click on Details to be redirected to the Details View, it is returning a NullReference Exception at the TMDBMappingService.

The exception is thrown when I try to get the iso_3166_1 value at the GetRating method. I checked and the value is indeed null after the app fetches the Movie data. I'm trying to figure out what's happening but so far I haven't been lucky. I appreciate any help.

Repo: https://github.com/murilodab/Cinemanage/blob/main/Services/TMDBMappingService.cs

The exception is thrown at line 126.
GitHub
Cinemanage/Services/TMDBMappingService.cs at main · murilodab/Cinem...
.NET Core MVC app to track and manage movies/shows - murilodab/Cinemanage
Cinemanage/Services/TMDBMappingService.cs at main · murilodab/Cinem...
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Absolutely clueless about this nullreference exception
C#CC# / help
3y ago
System.NullReference Exception Adding to a Dictionary [Answered]
C#CC# / help
4y ago
❔ NullReference exception thrown when assigning a value to a decimal??
C#CC# / help
4y ago
NullReference from API JSON
C#CC# / help
3y ago