public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Date,Type,Price")] Income income) { if (id != income.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(income); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!IncomeExists(income.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(income)); }