public async Task <IActionResult> Edit(int id, [Bind("Name,Id,IsActive,CreDate")] PaymentTypeEntity paymentTypeEntity) { if (id != paymentTypeEntity.Id) { return(NotFound()); } if (ModelState.IsValid) { try { await _paymentTypeRepository.UpdateAsync(paymentTypeEntity); } catch (DbUpdateConcurrencyException) { if (!PaymentTypeEntityExists(paymentTypeEntity.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(paymentTypeEntity)); }