示例#1
0
        public ActionResult Create(Refference refference)
        {


            if (ModelState.IsValid)
            {
                _db.Refferences.Add(refference);
                _db.SaveChanges();
                return RedirectToAction("Index");  
            }

            ViewBag.PossibleUser = _db.Users;
            return View(refference);
        }
示例#2
0
 public ActionResult Edit(Refference refference)
 {
     if (ModelState.IsValid)
     {
         _db.Entry(refference).State = EntityState.Modified;
         _db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.PossibleUser = _db.Users;
     return View(refference);
 }