public ActionResult Edit(Manager manager)
 {
     if (ModelState.IsValid)
     {
         _elementsService.Update(manager.Id, manager);
     }
     return RedirectToAction("List");
 }
 public ActionResult Create(Manager manager)
 {
     if (ModelState.IsValid)
     {
         _elementsService.Add(manager);
     }
     return RedirectToAction("List");
 }
 public void Add(Manager manager)
 {
     _managersRepository.Add(Mapper.Map<Manager, DAL.Models.Manager>(manager));
     _managersRepository.SaveChanges();
 }
 public void Update(int id, Manager item)
 {
     _managersRepository.Update(id, Mapper.Map<Manager, DAL.Models.Manager>(item));
     _managersRepository.SaveChanges();
 }