Exemplo n.º 1
0
        public async Task <IActionResult> Index(string name)
        {
            if (!string.IsNullOrWhiteSpace(name))
            {
                var viewModel = await service.GetImagesForTag(name);

                viewModel.Name = name;
                return(View(viewModel));
            }
            else
            {
                return(RedirectToAction(nameof(GalleryController.Index), "Gallery"));
            }
        }