> For the complete documentation index, see [llms.txt](https://patriq.gitbook.io/iota/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://patriq.gitbook.io/iota/development/make-an-iota-repository.md).

# Initialize IOTA repository

First, we need to initialize our main repository object. We can do that by typing:

```csharp
var repository = IotaRepositoryFactory.Create("https://altnodes.devnet.iota.org");
```

Easy, right? Now we have our repository object that is going to take care of all the communication between us and the IRI.&#x20;

![Example of repository class methods](https://2043776177-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Laz1nydn5IbWWiM1u12%2F-LdNr6dOtdJsA6ygx7dS%2F-LdNr7DGI4uF2uLrEK4-%2Fimage.png?alt=media\&token=1f413789-c356-4b17-b56d-a4d9d17d60a9)

If you are connected to a known IRI and you are sure that the node is stable for most cases, connecting like this is just fine. But sometimes there are cases where you need to have a fall back mechanism in case the node you are connected to fails, goes offline or is not in sync with the rest of the network. A solution can be carried out as follows:

```csharp
var IRI_Nodes = new List<string>() {
    "https://altnodes.devnet.iota.org",
    "https://nodes.devnet.thetangle.org:443/",
    "https://nodes.devnet.iota.org:443/",
};
var repository = IotaRepositoryFactory.CreateWithFallback(IRI_Nodes);
```

As you can see in the above picture, we have a list of IRIs instead of just a single one. In case a node times out (5 seconds by default) or is unresponsive, it will automatically try to connect to the next node. The behavior is similar to a [circuit breaker](https://martinfowler.com/bliki/CircuitBreaker.html).
