# Repository

## Concepts

* It is part of the Mandarine Data module.
* It works as a bridge between your database & your application layer.
* It **does not** accept the use of DI, but **it is** injectable.

## Usage

**Syntax:**&#x20;

```typescript
@Repository()
```

Example

```typescript
import { Repository, MandarineRepository } from "https://deno.land/x/mandarinets/mod.ts";

@Repository()
abstract class MyRepository extends MandarineRepository<YourModel> {

    constructor() {
        super(YourModel);
    }
    
}
```

{% hint style="info" %}
Where **YourModel** is the instance that represents a database table.
{% endhint %}
