private void PopulateConnectionsFor(DbToolContext context)
        {
            AvailableConnections.Clear();
            var connections = context.Connections;

            connections.Each(connection => AvailableConnections.Add(connection.Name));

            var firstConnection = connections.FirstOrDefault();

            if (firstConnection != null)
            {
                SelectedConnection = firstConnection.Name;
            }
        }
        public void Init()
        {
            List <CrmConnectionInfo> availableConnections = _connectionHelper.RetrieveAvailableConnections();

            if (ConnectionToExclude != null && availableConnections != null)
            {
                availableConnections.RemoveAll(x => x.UserId == ConnectionToExclude.UserId && x.OrganizationId == ConnectionToExclude.OrganizationId);
            }

            HasExistingConnections = availableConnections.Count > 0;

            if (!HasExistingConnections)
            {
                UseNewConnection = true;
            }

            foreach (CrmConnectionInfo crmConnectionInfo in availableConnections)
            {
                AvailableConnections.Add(crmConnectionInfo);
            }
        }