Example #1
0
        public ActionResult Create(LiveLink livelink)
        {
            if (ModelState.IsValid)
            {
                livelink.Owner = User.Identity.Name;

                repo.Add(livelink);

                return RedirectToAction("Index");
            }

            return View(livelink);
        }
Example #2
0
        public ActionResult Edit(LiveLink livelink)
        {
            if (ModelState.IsValid)
            {

                repo.Update(livelink);
                //db.Entry(livelink).State = EntityState.Modified;
                //db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(livelink);
        }