public IActionResult ShowAll(TownShallAllViewModel model) { // change input model and delete that one var viewModel = this.townService.GetTownsByCategoryName(model.CategoryName); return(this.View(viewModel)); }
public async Task <IActionResult> ShowAll(TownShallAllViewModel model) { var townWithCategoryDto = await this.townService.GetTownsByCategoryNameAsync(model.CategoryName); var townWithCategory = TownWithCategoryNameViewModelMapper.Map(townWithCategoryDto); return(this.View(townWithCategory)); }