// GET: SchedeEsercizi/Edit/5 public IActionResult Edit(int id) { var schedeEsercizi = _context.SchedeEsercizi.Where(x => x.IdScheda == id); if (schedeEsercizi == null) { return(NotFound()); } var model = SchedeViewModel.GetViewModel(id, _context); ViewData["ListaEserciziRiscaldamento"] = getEserciziRiscaldamento(); ViewData["ListaEsercizi"] = getEsercizi(); return(View(model)); }
// GET: SchedeEsercizi/Details/5 public IActionResult Details(int?id) { if (id == null) { return(NotFound()); } var schedeEsercizi = SchedeViewModel.GetViewModel(id ?? 0, _context); if (schedeEsercizi == null) { return(NotFound()); } return(View(schedeEsercizi)); }
// GET: SchedePersonalis/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var scheda = await _context.SchedePersonali .FirstOrDefaultAsync(m => m.Id == id); if (scheda == null) { return(NotFound()); } var schedeEsercizi = SchedeViewModel.GetViewModel(id ?? 0, _context); if (schedeEsercizi == null) { return(NotFound()); } return(View(schedeEsercizi)); }