Suppose you have my two Classes (USSTATE and CITY).
A STATE has a one to many relationship with CITY. One STATE has many CITIES.
The end result is that you want your Razor web page to display something like this (you want to display all rows in the CITY table, with its associated STATE).
City
State
Cleveland
Ohio
Las Vegas
Nevada
Austin
Texas
You are writing this code in the OnGet() Handler of your Index.cshtml file.
Member
17 Points
41 Posts
Re: .Net Core Best Practices For Returning Data From Linked (Foreign Key) Table
Dec 16, 2019 08:47 PM|bsashcraft|LINK
Hello DA924!
Let me ask the question a different way.
Suppose you have my two Classes (USSTATE and CITY).
A STATE has a one to many relationship with CITY. One STATE has many CITIES.
The end result is that you want your Razor web page to display something like this (you want to display all rows in the CITY table, with its associated STATE).
You are writing this code in the OnGet() Handler of your Index.cshtml file.
How would you write your OnGet() handler?
Thanks! I sincerely appreciate your time.