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));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 public void Add(Models.Profile profile)
 {
     DAL.Profile profileDAL = ConvertUtil.profilemodel2dal(profile);
     db.SaveChanges();
 }