public IActionResult AddStudentEnrollment([FromBody] StudentEnrollmentDTO value)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     try
     {
         //var idToken = HttpContext.GetTokenAsync(JwtBearerDefaults.AuthenticationScheme, "access_token");
         //var token = idToken.Result;
         var studentEnrollment = _studentService.AddStudentEnrollment(value, "");
         if (studentEnrollment != null)
         {
             return(Ok(studentEnrollment));
         }
         return(BadRequest(new { message = "Cannot Add Student Enrollment" }));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }
        public ActionResult <StudentEnrollmentListModel> AddStudentEnrollment(StudentEnrollmentListModel studentEnrollmentListModel)
        {
            StudentEnrollmentListModel studentEnrollmentAdd = new StudentEnrollmentListModel();

            try
            {
                if (studentEnrollmentListModel.studentEnrollments.Count > 0)
                {
                    studentEnrollmentAdd = _studentService.AddStudentEnrollment(studentEnrollmentListModel);
                }
                else
                {
                    studentEnrollmentAdd._token      = studentEnrollmentListModel._token;
                    studentEnrollmentAdd._tenantName = studentEnrollmentListModel._tenantName;
                    studentEnrollmentAdd._failure    = true;
                }
            }
            catch (Exception es)
            {
                studentEnrollmentAdd._failure = true;
                studentEnrollmentAdd._message = es.Message;
            }
            return(studentEnrollmentAdd);
        }