public ActionResult GenerateLink(LinkModel model) { if (ModelState.IsValid) { return RedirectToAction("Index", new LinkModel{ HappyLink = _links.GetHappyLink(model.OriginalLink)}); } return RedirectToAction("Index"); }
public ActionResult Index(LinkModel model) { if(model == null) model = new LinkModel(); ModelState.Clear(); return View("Index", model); }