public ActionResult CreateLink(Link link) { if (!ModelState.IsValid) { throw new HttpException(406, "Not Acceptable - Invalid Data"); } var newLink = AdminModuleManager.CreateLink(link); return(new JsonNetResult { Data = newLink }); }