public ActionResult Create([Bind(Include = "HotDogID,Name,LastAte,LastPlaceAte")] HotDog hotDog) { if (ModelState.IsValid) { db.HotDogs.Add(hotDog); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hotDog)); }
public ActionResult Create([Bind(Include = "ProfileID,Name,Bio,HotDogID")] Profile profile) { if (ModelState.IsValid) { db.Profiles.Add(profile); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(profile)); }
public void Add(Models.Profile profile) { DAL.Profile profileDAL = ConvertUtil.profilemodel2dal(profile); db.SaveChanges(); }