public async Task <IActionResult> Edit(int id, [Bind("ZplatformId,internalId,opplatform")] Zplatform zplatform) { if (id != zplatform.ZplatformId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(zplatform); TempData["Alert"] = String.Format("Saved Changes to Platform: {0}", zplatform.opplatform); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZplatformExists(zplatform.ZplatformId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(zplatform)); }
public async Task <IActionResult> Create([Bind("ZplatformId,internalId,opplatform")] Zplatform zplatform) { if (ModelState.IsValid) { _context.Add(zplatform); TempData["Alert"] = String.Format("Added Platform: {0}", zplatform.opplatform); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(zplatform)); }