Example #1
0
        public ActionResult Create([Bind(Include = "Id,Name,Gender,City,Photo,AlternateText")] Myemployee myemployee)
        {
            if (ModelState.IsValid)
            {
                db.Myemployees.Add(myemployee);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(myemployee));
        }
Example #2
0
        public ActionResult Create([Bind(Include = "higesteducation,status,age,id,name")] PersonDetail personDetail)
        {
            if (ModelState.IsValid)
            {
                db.PersonDetails.Add(personDetail);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(personDetail));
        }