public void PopulateModel(List <ProductType> pt, string selectedBrand, string selectedColour, string selectedGender, string selectedSeason, string selectedStyle) { var allBrands = new Populate().PopulateAllBrands(); allBrands.Add("All", "All"); Brand = new EnumerableDropDownViewModel(allBrands, selectedBrand == "" ? "All" : selectedBrand); Brand.Items = Brand.Items.OrderBy(t => t.Text).ToList(); var allColours = new Populate().PopulateAllColours(); allColours.Add("All", "All"); Colour = new EnumerableDropDownViewModel(allColours, selectedColour == "" ? "All" : selectedColour); Colour.Items = Colour.Items.OrderBy(t => t.Text).ToList(); var g = new Populate().PopulateAllGenders(); g.Add("All", "All"); Gender = new EnumerableDropDownViewModel(g, selectedGender == "" ? "All" : selectedGender); Gender.Items = Gender.Items.OrderBy(t => t.Text).ToList(); var allSeasons = new Populate().PopulateAllSeasons(); allSeasons.Add("All", "All"); Season = new EnumerableDropDownViewModel(allSeasons, selectedSeason == "" ? "All" : selectedSeason); Season.Items = Season.Items.OrderBy(t => t.Text).ToList(); var allStyles = new Populate().PopulateAllStyles(); allStyles.Add("All", "All"); Style = new EnumerableDropDownViewModel(allStyles, selectedStyle == "" ? "All" : selectedStyle); Style.Items = Style.Items.OrderBy(t => t.Text).ToList(); }