public async Task <IActionResult> Edit(int id, [Bind("Id,Date,Amount,Status")] SalesRecord salesRecord) { if (id != salesRecord.Id) { return(NotFound()); } if (ModelState.IsValid) { try { await _salesRecordsService.UpdatetAsync(salesRecord); } catch (DbUpdateConcurrencyException) { return(NotFound()); } return(RedirectToAction(nameof(Index))); } return(View(salesRecord)); }