I am working on autocomplete textbox. In this user can type their city name and from this input i want to search records from database table and display related combination list of city name, state name and country name.
How can i get this details using LINQ.
I have my table structure as below,
Country
Countryid PK
CountryName
State
Stateid PK
StateName
Countryid FK
City
Cityid PK
CityName
Stateid FK
I want to get result on autocomplete textbox.
E.g if user writes san
he will get list of city name contains san
like San Francisco, California, United States of America.
How can i write LINQ query to get this result.
1 Answer