//for filtering public List <Country> FilteredCountry(int a) { List <Country> qry; qry = countryDB.Getcountry(); countryDB = new CountryDB(); if (a == 1) { qry = qry.Where(e1 => e1.IsActive == true).ToList(); } else { qry = qry.Where(e1 => e1.IsActive == false).ToList(); } return(qry); }
//for getting the data table public List <Country> GetCountries() { countryDB = new CountryDB(); return(countryDB.Getcountry()); }