Exemplo n.º 1
0
        public IAggregate <TBoundedContext> GetAggregateByIdAndVersion(Guid id, int version, CommandToAggregate command)
        {
            var anemicModel = _unitOfWork.QueryRepository.GetQueryable()
                              .Single(f => f.Id == id && f.Version == version);
            var aggregate = Aggregate <TBoundedContext>
                            .CreateInstance(anemicModel, _scope);

            return(aggregate);
        }
Exemplo n.º 2
0
 public IAggregate <TBoundedContext> NewAggregate(IAnemicModel <TBoundedContext> anemicModel, CommandToAggregate command)
 => Aggregate <TBoundedContext> .CreateInstance(anemicModel, _scope);
Exemplo n.º 3
0
 .PipeTo(ck => Aggregate <TBoundedContext> .CreateInstance(input, scope))
 // TODO: add changed values
 .PipeTo(a => new AggregateResult <TBoundedContext>(a, command, null));