public IActionResult Details(int id)
        {
            if (id == 0)
            {
                return(NotFound());
            }

            PlatformType platformType = platformTypeService.GetByID(id);

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

            PlatformTypeDetailsViewModel viewModel = new PlatformTypeDetailsViewModel();

            viewModel.PlatformType = platformType;

            return(View(viewModel));
        }
Exemplo n.º 2
0
        public IActionResult Details(int id)
        {
            if (id == 0)
            {
                return(NotFound());
            }

            Platform platform = platformService.GetByID(id);

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

            PlatformType platformType = platformTypeService.GetByID((int)platform.PlatformTypeID);

            PlatformDetailsViewModel viewModel = new PlatformDetailsViewModel
            {
                Platform     = platform,
                PlatformType = platformType ?? null
            };

            return(View(viewModel));
        }