public async Task <IActionResult> Edit(Guid id, [Bind("Person_Id,duration,EndDate,IsEnd,Id,Ref,Price,Payement_date")] CustomerPayement customerPayement) { if (id != customerPayement.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(customerPayement); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomerPayementExists(customerPayement.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Person_Id"] = new SelectList(_context.Customers, "Person_Id", "Person_Id", customerPayement.Person_Id); return(View(customerPayement)); }