There is 2 ways to do this. The first way is to have a complete list of all provinces and another list with all districts. The when your user selects a province, you can use LinQ on the
List<district>
, something like :-
var selectedDistricts = from district in Districts where district.ProvinceID == selectedProvince.ID select district;
The other option is to have a function which looks up in the database and returns all districts with the selected provinces id.i.e
"SELECT id, name, provinceID, etc FROM Districts WHERE provinceID = @provinceID;"
where provinceid is the selected provinces id.