/// <summary>Shows all types of materials on the page.</summary> /// <param name="pageNumber">The number of current page.</param> /// <returns>Materials list page.</returns> public async Task <ActionResult> DisplayAll(int pageNumber = 1) { var materials = await _materialService.GetMaterialsWithFile(pageNumber, PageSize); var statistic = materials.ToDictionary(m => m.Id, m => new MaterialStatisticViewModel { AllWordsCount = _materialService.WordsCountInMaterial(m) }); var model = new DisplayAllViewModel(PageSize, pageNumber, _materialService.TotalCount(), materials, statistic); return(View(model)); }