Esempio n. 1
0
        public ActionResult registercourse(courseslist course)
        {
            addcourses newcourse = new addcourses();

            newcourse.putcourse(course.courseName, course.courseNumber);
            return(RedirectToAction("ManageCourses", "Tables"));
        }
Esempio n. 2
0
        public void putcourse(String CourseName, int coursenumber)

        {
            courseslist course = new courseslist
            {
                courseName   = CourseName,
                courseNumber = coursenumber
            };

            _db.courseslists.Add(course);
            _db.SaveChanges();
            _db.Dispose();
        }