public async Task <IActionResult> Edit(int id, AccountingParameter accountingParameter) { if (id != accountingParameter.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(accountingParameter); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AccountingParameterExists(accountingParameter.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(accountingParameter)); }
public async Task <IActionResult> Create(AccountingParameter accountingParameter) { if (ModelState.IsValid) { _context.Add(accountingParameter); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(accountingParameter)); }