Пример #1
0
 public ActionResult Edit([Bind(Include = "Id,Name")] ExamNames ExamNames)
 {
     if (ModelState.IsValid)
     {
         rep.Update(ExamNames);
         return(RedirectToAction("Index"));
     }
     return(View(ExamNames));
 }
Пример #2
0
        public ActionResult Delete(int id = 0)
        {
            ExamNames user = rep.GetById(id);

            if (user == null)
            {
                return(HttpNotFound());
            }
            return(View(user));
        }
Пример #3
0
        public ActionResult Create([Bind(Include = "Name")] ExamNames ExamNames)
        {
            if (ModelState.IsValid)
            {
                rep.Add(ExamNames);
                return(RedirectToAction("Index"));
            }

            return(View(ExamNames));
        }
Пример #4
0
 public void Update(ExamNames entity)
 {
     rep.Update(entity, x => x.Name);
 }
Пример #5
0
 public ExamNames Add(ExamNames entity)
 {
     return(rep.Add(entity));
 }