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

            newcourse.putcourse(course.courseName, course.courseNumber);
            return(RedirectToAction("ManageCourses", "Tables"));
        }
Exemplo 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();
        }