public ActionResult AddEntry(AddEntryViewModel model) { if(!this.ModelState.IsValid) { return View(model); } WorkerServices.AddEntry(model); return Redirect("/Registry/"); }
public ActionResult AddEntry() { var model = new AddEntryViewModel(); return View(model); }
public void AddEntry(AddEntryViewModel model) { var command = new RegisterPersonCommand(model.FirstName, model.LastName, model.DateOfBirth); Bus.Send(command); }