Exemplo n.º 1
0
 public ActionResult Edit(Lecturer lecturer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lecturer).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(lecturer);
 }
Exemplo n.º 2
0
        public ActionResult Create(Lecturer lecturer)
        {
            if (ModelState.IsValid)
            {
                db.Lecturers.Add(lecturer);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(lecturer);
        }
Exemplo n.º 3
0
Arquivo: Unit.cs Projeto: rtw/SARMS
 public void ChangeLecturer(Lecturer lecturer)
 {
     Lecturer = lecturer;
 }