public async Task <IActionResult> Edit(int id, [Bind("UserDoneCoursesInfoId,courseId,TrainerName,DoneCourses,Grade")] UserDoneCoursesInfo userDoneCoursesInfo)
        {
            if (id != userDoneCoursesInfo.UserDoneCoursesInfoId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(userDoneCoursesInfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UserDoneCoursesInfoExists(userDoneCoursesInfo.UserDoneCoursesInfoId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(userDoneCoursesInfo));
        }
        public async Task <IActionResult> Create([Bind("UserDoneCoursesInfoId,courseId,TrainerName,DoneCourses,Grade")] UserDoneCoursesInfo userDoneCoursesInfo)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userDoneCoursesInfo);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userDoneCoursesInfo));
        }