Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<CountryGridViewModel> GetSearchCountry(CountryContentViewModel ItCountryContentViewModel)
- {
- List<CountryGridViewModel> ItListCountryGridViewModel = new List<CountryGridViewModel>();
- using (var db = new learnEntities())
- {
- var listCountries = db.USP_GetCountry(ItCountryContentViewModel.country_id, ItCountryContentViewModel.country_name).ToList();
- foreach(var country in listCountries)
- {
- CountryGridViewModel ItCountryGridViewModel = new CountryGridViewModel();
- ItCountryGridViewModel.Country_Id = country.Country_Id;
- ItCountryGridViewModel.Country_Name = country.Country_Name;
- ItListCountryGridViewModel.Add(ItCountryGridViewModel);
- }
- }
- return ItListCountryGridViewModel;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement