public async Task <IActionResult> Edit(int id, [Bind("IdnumberFormat,NumberFormat,Description,Name")] Numberformat numberformat) { if (id != numberformat.IdnumberFormat) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(numberformat); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!NumberformatExists(numberformat.IdnumberFormat)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(numberformat)); }
public async Task <IActionResult> Create([Bind("IdnumberFormat,NumberFormat,Description,Name")] Numberformat numberformat) { if (ModelState.IsValid) { _context.Add(numberformat); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(numberformat)); }