public async Task <IActionResult> Create([Bind("Id,UserCourseId,CourseExamId,DateTaken")] UserCourseExam userCourseExam)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userCourseExam);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userCourseExam));
        }
        public async Task <IActionResult> Create([Bind("Id,UserProfileId,CourseId,DateEnrolled,Score")] UserCourse userCourse)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userCourse);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userCourse));
        }
示例#3
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,PhoneNumber,Address,EmployeeId,DateCreated,DepartmentId,UserType")] UserProfile userProfile)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userProfile);
                await _context.SaveChangesAsync();

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