Skip to content

Repositories

Kevin Le Jeune edited this page Sep 8, 2016 · 1 revision

A repository is a set of Aggregates. It can be used to retrieve these aggregates.

Declaration

A repository is not declared manually. Repositories will be automatically associated to each aggregate type.

Usage

A repository can be injected through IoC:

    [Inject]
    public IRepository<ITodoList> TodoLists { get; set; }

A repository can be browsed with the Linq syntax.

It can also be used to retrieve an aggregate by ID:

        var list = this.TodoLists.GetById(this.TodoListId);
Clone this wiki locally