Beispiel #1
0
 public AggregateProvider(
     IUnitOfWork <TBoundedContext> unitOfWork,
     IBoundedContextScope <TBoundedContext> scope)
 {
     _unitOfWork = unitOfWork;
     _scope      = scope;
 }
Beispiel #2
0
 private Aggregate(
     IAnemicModel <TBoundedContext> anemicModel,
     IBoundedContextScope <TBoundedContext> scope)
 {
     _anemicModel = anemicModel;
     _scope       = scope;
 }
Beispiel #3
0
 public static IAggregate <TBoundedContext> CreateInstance(
     IAnemicModel <TBoundedContext> anemicModel,
     IBoundedContextScope <TBoundedContext> scope)
 => new Aggregate <TBoundedContext>(anemicModel, scope);
Beispiel #4
0
 public AggregateResult <TBoundedContext> Handle(
     IAnemicModel <TBoundedContext> input,
     CommandToAggregate command,
     IBoundedContextScope <TBoundedContext> scope)
 => input.Id
 .Either(c => c == default, s => command.CorrelationToken, n => n)