public List <KeyValuePair <int, string> > GetSubCategoriesList(int categoryID) { List <KeyValuePair <int, string> > LstKeyValues = new List <KeyValuePair <int, string> >(); List <Sub_Category> lstcust = client.GetAllSubCategoriesByID(categoryID).ToList(); foreach (Sub_Category q in lstcust) { KeyValuePair <int, string> kvp = new KeyValuePair <int, string>(q.SubCategoryID_N, q.SubCategoryName_V); LstKeyValues.Add(kvp); } return(LstKeyValues); }