//
 // GET: /Class/Details/5
 public ActionResult Details(int id = 0)
 {
     ClassDTO classDto = _classBus.GetById(id);
     var c = new Class(classDto);
     if (classDto == null)
     {
         return HttpNotFound();
     }
     return View(c);
 }
        public ActionResult Create(Class c)
        {
            if (ModelState.IsValid)
            {
                var classDto = new ClassDTO {Name = c.Name, Code = c.Code};
                _classBus.Save(classDto);
                return RedirectToAction("Index");
            }

            return View(c);
        }
        public ActionResult Edit(Class c)
        {
            if (ModelState.IsValid)
            {

                var classDto = new ClassDTO {Id = c.Id, Name = c.Name, Code = c.Code};
                _classBus.Update(classDto);
                return RedirectToAction("Index");
            }
            return View(c);
        }
 //
 // GET: /Class/Edit/5
 public ActionResult Edit(int id = 0)
 {
     ClassDTO classDto = _classBus.GetById(id);
     var c = new Class(classDto);
     return View(c);
 }