public IActionResult EditInstance(long id) { var instanceToEdit = _monitor.GetInstanceToEdit(id, GetCurrentUserAsync().Result.UserName); if (instanceToEdit == null) { _toastNotification.AddSuccessToastMessage("Instance Not found", new ToastrOptions() { PositionClass = ToastPositions.TopCenter }); return(RedirectToAction("ListInstance")); } ViewBag.Pass = instanceToEdit.LoginPassword; ViewBag.ServiceList = _monitor.ServiceList(instanceToEdit.ServiceId); return(View(instanceToEdit)); }