public static List <TinhThanh> GetAllProvince() { var res = proRepo.All().ToList(); foreach (var item in res) { item.QuanHuyens = new List <QuanHuyen>(); } return(res); }
protected string LoadProvince() { ProvinceRepository prorepo = new ProvinceRepository(); StringBuilder str = new StringBuilder(""); foreach (var item in prorepo.All()) { str.Append("<option value='" + item.MaTinh + "'>" + item.TenTinh + "</option>"); } return(str.ToString()); }