public async Task <IActionResult> Edit(int id, [Bind("Id,prodName,prodPrice,prodDescription,prodSupplierName")] upwebapp upwebapp) { if (id != upwebapp.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(upwebapp); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!upwebappExists(upwebapp.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(upwebapp)); }
public async Task <IActionResult> Create([Bind("Id,prodName,prodPrice,prodDescription,prodSupplierName")] upwebapp upwebapp) { if (ModelState.IsValid) { _context.Add(upwebapp); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(upwebapp)); }