public SiteConfigSearchViewModel LoadSiteSearchData() { SiteConfigSearchViewModel viewModel = new SiteConfigSearchViewModel(); List <SelectListItem> sites = new List <SelectListItem>(); var siteList = _partService.GetAllSite().Where(x => x.Configured == 1).ToList(); foreach (var site in siteList) { sites.Add(new SelectListItem { Value = site.SiteNo.ToString(), Text = site.SiteName }); } viewModel.ConfiguredSitesList = sites; viewModel.Schemes = new List <SelectListItem>() { new SelectListItem() { Value = "1", Text = "8 Digit Scheme" }, new SelectListItem() { Value = "2", Text = "American Scheme" }, new SelectListItem() { Value = "3", Text = "British Scheme" }, }; return(viewModel); }