public async Task <IActionResult> Create([Bind("ID,FirstName,LastName,Reg_No,Email,UserName,Password")] Student_details student_details)
        {
            if (ModelState.IsValid)
            {
                _context.Add(student_details);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(student_details));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("ID,Student_detailsID,Maths,Chem,Physics")] Marks marks)
        {
            if (ModelState.IsValid)
            {
                _context.Add(marks);
                await _context.SaveChangesAsync();

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