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