Exemplo n.º 1
0
        public async Task <bool> RemoveConnection(string Id)
        {
            var conn = await _connectionRepository.GetById(Id);

            if (conn is null)
            {
                return(false);
            }
            return(await _connectionRepository.DeleteById(conn));
        }
Exemplo n.º 2
0
        private Connection GetConnection(Guid connectionId)
        {
            var connectionInfo = _connectionRepository.GetById(connectionId);

            if (connectionInfo == null)
            {
                throw new ConnectionNotFoundException();
            }

            return(connectionInfo);
        }
Exemplo n.º 3
0
        private string GetConnectionString(Guid connectionId)
        {
            var eventStoreConnection = _connectionRepository.GetById(connectionId);

            if (eventStoreConnection == null)
            {
                throw new EventStoreConnectionNotFoundException();
            }

            return(eventStoreConnection.ConnectionString);
        }
Exemplo n.º 4
0
 public Connection GetById(Guid id)
 {
     return(_connectionRepository.GetById(id));
 }