public ActionResult Edit(ImpostoVIewModel Imposto) { if (ModelState.IsValid) { var ImpostoDomain = Mapper.Map <ImpostoVIewModel, Imposto>(Imposto); _impostoApp.Update(ImpostoDomain); return(RedirectToAction("Index")); } return(View(Imposto)); }
public ActionResult Create(ImpostoVIewModel Imposto) { try { // TODO: Add insert logic here if (ModelState.IsValid) { var ImpostoDomain = Mapper.Map <ImpostoVIewModel, Imposto>(Imposto); _impostoApp.Add(ImpostoDomain); return(RedirectToAction("Index")); } return(View(Imposto)); } catch { return(View()); } }