Esempio n. 1
0
        public ActionResult Delete(int id, CD cd)
        {
            try
            {
                _cdModel.Delete(id);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Esempio n. 2
0
        public ActionResult Create(CD cd)
        {
            try
            {
                _cdModel.Save(cd);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Esempio n. 3
0
 public void Save(CD cd)
 {
     var cdEntity = Mapper.Map<CD, Data.Entities.CD>(cd);
     _cdRepository.Save(cdEntity);
 }
Esempio n. 4
0
        public ActionResult Edit(int id, CD cd)
        {
            try
            {
                _cdModel.Save(cd);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }