public async Task <IActionResult> Edit(int id, [Bind("AdvancePaymentDate,FirstPaymentDate,InstallementCount,AdvancePaymentPrice,Id,IsActive,PaymentTypeId")] StudentPaymentEntity studentPaymentEntity)
        {
            if (id != studentPaymentEntity.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                studentPaymentEntity.StudentId = StudentId;
                try
                {
                    await _studentPaymentRepository.UpdateAsync(studentPaymentEntity);
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StudentPaymentEntityExists(studentPaymentEntity.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index), new { id = StudentId }));
            }
            return(View(studentPaymentEntity));
        }
        public async Task <IActionResult> Create([Bind("AdvancePaymentDate,FirstPaymentDate,InstallementCount,AdvancePaymentPrice,Id,PaymentTypeId,CreDate")] StudentPaymentEntity studentPaymentEntity)
        {
            if (ModelState.IsValid)
            {
                studentPaymentEntity.StudentId = StudentId;
                await _studentPaymentRepository.AddAsync(studentPaymentEntity);

                return(RedirectToAction(nameof(Index), new { id = StudentId }));
            }
            return(View(studentPaymentEntity));
        }