示例#1
0
        public ActionResult Create([Bind(Include = "id,jobTitle,location,ShortDiscription,jobintroduction,Yourmission,Skills,BanerImage")] Career career)
        {
            if (ModelState.IsValid)
            {
                db.Career.Add(career);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(career));
        }
        public ActionResult Create([Bind(Include = "id,Blog,Date,Category,Heading,ShortDiscription,FeaturedImage")] BlogTable blogTable)
        {
            db.Database.CommandTimeout = 50;
            if (ModelState.IsValid)
            {
                db.BlogTable.Add(blogTable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(blogTable));
        }