public ActionResult Edit(NatureColisViewModel cl) { if (ModelState.IsValid) { var us = Mapper.Map<NatureColisViewModel, NatureColis>(cl); ty_.update(us); return RedirectToAction("index"); } return View(cl); }
public ActionResult Create(NatureColisViewModel cl) { if (ModelState.IsValid) { var us_ = Mapper.Map<NatureColisViewModel, NatureColis>(cl); ty_.add(us_); return RedirectToAction("Index"); } return View(cl); }