public List <CityViewModel> GetAllCityList() { DataTable city = _homeRepositories.GetCityListDetail(); if (city.Rows.Count > 0) { List <CityViewModel> lstCity = new List <CityViewModel>(); lstCity = ConvertDatatableToModelList.ConvertDataTable <CityViewModel>(city); return(lstCity); } throw new DataNotFound("City data not found"); }