public async Task <IActionResult> Edit(int id, [Bind("TechMapId,MinValueAmp,MaxValueAmp,MinValueVolt,MaxValueVolt")] TechMap techMap) { if (id != techMap.TechMapId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(techMap); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TechMapExists(techMap.TechMapId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(techMap)); }
public async Task <IActionResult> Create([Bind("TechMapId,MinValueAmp,MaxValueAmp,MinValueVolt,MaxValueVolt")] TechMap techMap) { if (ModelState.IsValid) { _context.Add(techMap); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(techMap)); }