public ActionResult Create()
        {
            var model = new ClassroomViewModel();
            model.ClassroomTypeList = new SelectList (_classroomTypeService.GetAll(), SelectLists.DataValueField, SelectLists.DataTextField, SelectLists.UnitializedSelectValue);

            return View(model);
        }
        public ActionResult Create(ClassroomViewModel model)
        {
            if (ModelState.IsValid)
            {
                var businessObject = new BOClassroom();
                Mapper.Map<ClassroomViewModel, BOClassroom>(model, businessObject);

                businessObject.ClassroomType = new BOClassroomType(model.ClassroomTypeListID);

                _classroomService.Save(businessObject);

                return RedirectToAction("Index");
            }
            model.ClassroomTypeList = new SelectList (_classroomTypeService.GetAll(), SelectLists.DataValueField, SelectLists.DataTextField, SelectLists.UnitializedSelectValue);

            return View(model);
        }
        public ActionResult Edit(ClassroomViewModel model)
        {
            if (ModelState.IsValid)
            {
                BOClassroom businessObject = _classroomService.GetById(model.ID);
                Mapper.Map<ClassroomViewModel, BOClassroom>(model, businessObject);

                _classroomService.Save(businessObject);

                return RedirectToAction("Index");
            }

            return View(model);
        }
 public ActionResult EditProperties(ClassroomViewModel model)
 {
     return PartialView("_classroom", model);
 }