public ActionResult Create(WorkerCreateModel model) { if (ModelState.IsValid) { var worker = _workerCreateCommand.Execute(model); return RedirectToAction("Details", new {id = worker.Id}); } return View(model); }
public ActionResult Create() { var model = new WorkerCreateModel(); return View(model); }