public static List <City> GetCityById(Guid stateID) { List <tblCity> city = dropDownRepository.GetCityId(stateID); List <City> list = new List <City>(); foreach (var item in city) { City cityobj = new City() { CityID = item.CityID, CityName = item.CityName }; list.Add(cityobj); } return(list); }