Example #1
0
        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);
        }
Example #2
0
 public HomeController()
 {
     endPointService = new EndPointService();
 }