public ActionResult Create([Bind(Include = "ID,CName,CDifficulty")] Chore chore) { if (ModelState.IsValid) { db.Chores.Add(chore); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(chore)); }
public ActionResult Create([Bind(Include = "ID,FirstName,LastName")] Roommate roommate) { if (ModelState.IsValid) { db.Roommates.Add(roommate); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(roommate)); }