Exemplo n.º 1
0
 public ActionResult Edit(CompanyModel model)
 {
     if (!ModelState.IsValid) return View("Add", model);
     Mapper.Map<CompanyModel, Company>(model);
     return RedirectToAction("Index");
 }
Exemplo n.º 2
0
 public ActionResult Add()
 {
     var model = new CompanyModel();
     return View(model);
 }