public ActionResult Delete(string RepositoryName, bool Delete) { if (!Authenticate()) { return(View("Login", GetBaseView(new LoginViewModel { Message = "You need to authenticate before being able to create a project", ReturnURL = Url.Action("Delete", "Repository", new { RepositoryName }) }))); } if (!Delete) { SetTemporaryNotification("Repository '{0}' was not deleted", RepositoryName); return(RedirectToAction("Index")); } bool success = BaseAPI.Delete(RepositoryName); SetTemporaryNotification("Repository '{0}' was {1}deleted", RepositoryName, success ? string.Empty : "not "); return(RedirectToAction("Index")); }