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

# Data Repository

## General information

Data repository refers to the functionality of loading data from any data source (e.g. data table, excel file, API endpoint, ...) into a repository that you can interact with using different functions.

The following sub-articles cover the functions provided to interact with a repository, which can be found in the file "IRepository.cs" in the Data directory of each project.

## How to use

To be able to use these functions on a repository, the data you want to use needs to be loaded from the database into the repository first. This is done in the following way:&#x20;

```
var dataContext = new DataContext();
var repo = new Repository<ProductionOrder>(dataContext);
```

The code above loads the table of the Entity "Production Order" from the database into the newly created repository "repo". (This is also the repository that will be used in the examples in the following sub-articles.)
