public async Task <ActionResult> Index() { var stocks = (await _badStockService.GetStocks()).Items; var total = await _badStockService.GetTotal(); var model = new BadStockListViewModel { StockListDtos = stocks, Total = total }; return(View(model)); }
public async Task <ActionResult> Print() { List <string> dups = new List <string>(); var brands = (await _productService.GetProduct()).Items; foreach (var dups1 in brands) { dups.Add(dups1.Brand); } var dups2 = dups.GroupBy(x => x) .Where(g => g.Count() > 1) .Select(x => x.Key) .ToList(); var model = new BadStockListViewModel { StockListDtos = (await _badStockService.GetStocks()).Items, Total = await _badStockService.GetTotal(), LoginInformations = await _sessionAppService.GetCurrentLoginInformations(), ProductBrands = dups2 }; return(View(model)); }