public IActionResult Details(int id) { ScenarioDetailViewModel model = mapper.Map <ScenarioDetailViewModel>(scenarioRepository.FindById(id)); model.Monitors = mapper.MapEnumerable <MonitorListDTO>(scenarioRepository.GetMonitors(id)).ToList(); return(View(model)); }
private ScenarioDetailViewModel GetScenarioDetailViewModel(int id) { var viewModel = new ScenarioDetailViewModel(); var title = _scenarioService.GetScenario(new GetScenarioRequest { Id = id }).Name; viewModel.ScenarioId = id; ViewBag.Title = title; return(viewModel); }