© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•16mo ago
morry329#

my MVC view thinks my model is null!

I wanted to load backend data (MariaDB via Rider) onto my browser as part of developing my simple ASP.NET Core web app.
The problem now is that the browser does not display the backend data (it thinks my model got null data, as per screenshot)
If I check the data table and columns etc I see it is not null;
mysql> SELECT * FROM ListingDBTable;
+----+---------------------+------------------------------+------------+------------+
| Id | ListingName         | ImageUrl                     | CategoryId | LocationId |
+----+---------------------+------------------------------+------------+------------+
|  1 | Potato Head Rooftop | someurl                      |          1 |          1 |
|  2 | Sample Listing      | http://example.com/image.jpg |          1 |          1 |
+----+---------------------+------------------------------+------------+------------+
mysql> SELECT * FROM ListingDBTable;
+----+---------------------+------------------------------+------------+------------+
| Id | ListingName         | ImageUrl                     | CategoryId | LocationId |
+----+---------------------+------------------------------+------------+------------+
|  1 | Potato Head Rooftop | someurl                      |          1 |          1 |
|  2 | Sample Listing      | http://example.com/image.jpg |          1 |          1 |
+----+---------------------+------------------------------+------------+------------+
`
I wanted to see those data loaded and displayed on my browser/frontend, but did not work.
My code is as follows https://pastebin.com/arBxrSCR
Could anyone point me in the right direction??
Bildschirmfoto_2024-10-14_um_01.26.46.png
Pastebin
/*the view (htmlcs) in question that displays no listings available...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
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

❔ ❔ MVC - Chart - Model - NullReferenceException
C#CC# / help
4y ago
✅ Item Returning Null From View Model??? Avalonia
C#CC# / help
2y ago
✅ Model Null
C#CC# / help
3y ago