public async Task <IActionResult> ProjectPayments(Payment payment) { if (ModelState.IsValid) { int id = await _paymentRepository.AddNew(payment); if (id > 0) { return(RedirectToAction(nameof(ProjectPayments), new { isSuccess = true, projectId = payment.ProjectId, Title = payment.ProjectName })); } } var data = await _paymentRepository.GetByProjectID(payment.ProjectId); ViewBag.projects = data; return(View()); }