public IActionResult Sku(string catalogEntryCode) { List <string> allMarketId = databaseModel.getAllMarketId(catalogEntryCode); Dictionary <string, List <ProductRow> > dictonary = productModel.createDictionary(allMarketId); List <List <string> > matchingValues = databaseModel.getMatchingValues(catalogEntryCode); Dictionary <string, List <ProductRow> > dictonaryList = productModel.addValuesToListList(matchingValues, dictonary); Dictionary <string, List <ProductRow> > sortDictionary = productModel.sortDictionary(dictonaryList); Dictionary <string, List <ProductRow> > orderdDictionary = productModel.setProductsList(sortDictionary, allMarketId); foreach (KeyValuePair <string, List <ProductRow> > entry in orderdDictionary) { ViewData[entry.Key] = entry.Value; } ViewData["allMarketId"] = allMarketId; return(View()); }