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

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

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

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