public ActionResult Create([Bind(Include = "macAddressID,issuedDate,studentResponsible")] Module module)
        {
            if (ModelState.IsValid)
            {
                db.Modules.Add(module);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(module));
        }
예제 #2
0
        public ActionResult Create([Bind(Include = "userID,firstName,lastName,password")] User user)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }