public IActionResult PostPayment([FromBody] PaymentDtls payment)
 {
     if (ModelState.IsValid)
     {
         bool result = studentRepository.AddPayment(payment);
         return(Created("AddPayment", payment));
     }
     return(BadRequest(ModelState));
 }
 public bool AddPayment(PaymentDtls payment)
 {
     try
     {
         context.PaymentDtls.Add(payment);
         var result = context.SaveChanges();
         if (result > 0)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception)
     {
         throw;
     }
 }