Exemplo n.º 1
0
        public ActionResult Create([Bind(Include = "Id,Name,Dob")] Employee employee)
        {
            if (ModelState.IsValid)
            {
                db.Employees.Add(employee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(employee));
        }