public List <CityViewModel> GetCityList()
        {
            DataTable city = _masterRepository.GetAllCitiesWithoutState();

            if (city.Rows.Count > 0)
            {
                List <CityViewModel> lstCity = new List <CityViewModel>();
                lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city);
                return(lstCity);
            }
            throw new UserNotFoundException("User not found");
        }
        public IList <CityViewModel> GetAllCity()
        {
            var dt = _masterDataRepository.GetAllCitiesWithoutState().Rows.Cast <DataRow>().ToList();
            IList <CityViewModel> list = new List <CityViewModel>();

            foreach (DataRow row in dt)
            {
                CityViewModel city = new CityViewModel()
                {
                    City      = row["City"] as string ?? "",
                    CityCode  = row["CityCode"] as string ?? "",
                    StateCode = row["StateCode"] as string ?? "",
                };
                list.Add(city);
            }
            return(list);
        }