# `DDD.InMemoryRepository`
[🔗](https://github.com/blackuprise/vicander/blob/v0.1.1/lib/ddd/persistence/in_memory_repository.ex#L1)

Generic in-memory repository adapter. Ideal for tests.

## Usage

    defmodule MyApp.Test.OrderRepository do
      use DDD.InMemoryRepository,
        port: MyApp.OrderRepository
    end

Entities are stored under `DDD.Identity.key/1`: the identity field's value, or the identity
string for a composite identity (the argument of `find_by_id/1`).

    {:ok, _} = MyApp.Test.OrderRepository.start_link()

---

*Consult [api-reference.md](api-reference.md) for complete listing*
