public static Task Save <TAggregate>(this AggregateRepository repository, TAggregate aggregate, CancellationToken cancellationToken = default(CancellationToken))
     where TAggregate : IAggregateRoot => repository.Save <TAggregate>(aggregate, null, cancellationToken);
 public static Task <TAggregate> GetById <TAggregate>(this AggregateRepository repository, string id, CancellationToken cancellationToken = default(CancellationToken))
     where TAggregate : IAggregateRoot, new() => repository.GetById <TAggregate>(id, int.MaxValue, cancellationToken);
Exemplo n.º 3
0
 protected ApplicationService(AggregateRepository repository)
 {
     _repository = repository;
 }