public async Task <IActionResult> Edit(int id, [Bind("ItbisID,PorcientoItbis,DescripcionItbis")] Itbis itbis) { if (id != itbis.ItbisID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(itbis); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ItbisExists(itbis.ItbisID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(itbis)); }
public async Task <IActionResult> Create([Bind("ItbisID,PorcientoItbis,DescripcionItbis")] Itbis itbis) { if (ModelState.IsValid) { _context.Add(itbis); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(itbis)); }