public ActionResult submit(EndPointIndexVM vm) { if (ModelState.IsValid) { EndPointService endpointSrvc = new EndPointService(); ServiceInstanceVM sivm = endpointSrvc.GetAllAvailableEndPoints().Where(x => x.Url == vm.ServiceInstance.Url).First(); endpointSrvc.SetEndPoint(sivm); if (!Request.IsAjaxRequest()) { return RedirectToAction("Index", "Home", null); } else { return Content("success"); } } return View("Index",vm); }
public HomeController() { endPointService = new EndPointService(); }