//
        // GET: /Dependencies/Create
        public ActionResult CreateServerDependency(Guid id)
        {
            var viewmodel = new CreateServerDependencyViewModel();
            var tempServer = new ApplicationPortfolio.Domain.DataConnections.Server();
            tempServer.ServerId = id;
            viewmodel.Server = tempServer;

            viewmodel.Applications = AppRepo.GetAllApplications();

            return View(viewmodel);
        }
        public ActionResult CreateServerDependency(CreateServerDependencyViewModel createServerDependencyViewModel)
        {
            try
            {
                ApplicationServerDependency applicationServerDependency = new ApplicationServerDependency();
                applicationServerDependency.ApplicationId = createServerDependencyViewModel.SelectedApplicationId;
                applicationServerDependency.ServerId = createServerDependencyViewModel.Server.ServerId;

                var result = DependRepo.CreateDependency(applicationServerDependency);
                if (result == "Success")
                {
                    return RedirectToAction("Details", new { id = createServerDependencyViewModel.Server.ServerId, AppOrServer = "Server" });
                }

                return View(createServerDependencyViewModel);
            }
            catch
            {
                return View();
            }
        }