示例#1
0
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var idiomaViewModel = await _idiomaHttpService.GetByIdAsync(id.Value);

            if (idiomaViewModel == null)
            {
                return(NotFound());
            }
            var pais = await _paisHttpService.GetByIdAsync(idiomaViewModel.PaisId);

            if (pais.Id == idiomaViewModel.PaisId)
            {
                idiomaViewModel.Pais = pais;
            }

            return(View(idiomaViewModel));
        }
示例#2
0
        // GET: Pais/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var paisViewModel = await _paisHttpService.GetByIdAsync(id.Value);

            if (paisViewModel == null)
            {
                return(NotFound());
            }

            return(View(paisViewModel));
        }