public IActionResult InfoPerros(string id) { RazasRepository repos = new RazasRepository(); InfoPerroViewModel vm = new InfoPerroViewModel(); vm.Raza = repos.GetRazaByNombre(id); if (vm.Raza == null) { return(RedirectToAction("Index")); } else { vm.OtrasRazas = repos.Get4RandomRazasExcept(id); return(View(vm)); } }