When an end user goes to create an address for someone in the app, they would enter in the ZIP code.
The City would then populate a drop down based on the ZIP code specified.
When the City is then selected, the State is populated in another drop down.
The County and Time Zone is populated based on the ZIP code entered.
All the ZIP codes, time zones, City, State and Counties are unique in the database.
Relationships are being used.
My question:
I would like to know how I can get all the relevant information for the record based on something unique?
Right now, I am not seeing a viable or best solution for this.
you had mentioned that,"I would like to know how I can get all the relevant information for the record based on something unique?"
you can try to add one unique field like 'id' in your table to identify the records uniquely.
then you can try to fire a query in your code to fetch the relevant data.
if you had already developed the code that access the data using query then let us know about that. we can try to check the query in that.
Regards
Deepak
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
4 Points
13 Posts
MSSQL, MVC Code-First, Schema Design
Aug 13, 2017 03:52 AM|notary|LINK
Hi all,
I am using MVC code-first with an MSSQL backend.
I am going to be storing address information.
When an end user goes to create an address for someone in the app, they would enter in the ZIP code.
The City would then populate a drop down based on the ZIP code specified.
When the City is then selected, the State is populated in another drop down.
The County and Time Zone is populated based on the ZIP code entered.
All the ZIP codes, time zones, City, State and Counties are unique in the database.
Relationships are being used.
My question:
I would like to know how I can get all the relevant information for the record based on something unique?
Right now, I am not seeing a viable or best solution for this.
My entities look like so:
ZIPCodeList.cs
CityList.cs
StateList.cs
CountyList.cs
Contributor
2930 Points
1210 Posts
Re: MSSQL, MVC Code-First, Schema Design
Aug 14, 2017 09:30 AM|Deepak Panchal|LINK
Hi notary,
you had mentioned that,"I would like to know how I can get all the relevant information for the record based on something unique?"
you can try to add one unique field like 'id' in your table to identify the records uniquely.
then you can try to fire a query in your code to fetch the relevant data.
if you had already developed the code that access the data using query then let us know about that. we can try to check the query in that.
Regards
Deepak
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.