Example #1
0
        public IActionResult ShowAll(TownShallAllViewModel model)
        {
            // change input model and delete that one
            var viewModel = this.townService.GetTownsByCategoryName(model.CategoryName);

            return(this.View(viewModel));
        }
Example #2
0
        public async Task <IActionResult> ShowAll(TownShallAllViewModel model)
        {
            var townWithCategoryDto = await this.townService.GetTownsByCategoryNameAsync(model.CategoryName);

            var townWithCategory = TownWithCategoryNameViewModelMapper.Map(townWithCategoryDto);

            return(this.View(townWithCategory));
        }