C
C#3w 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??
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.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server