예제 #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);
        }
예제 #2
0
 public IAggregate <TBoundedContext> NewAggregate(IAnemicModel <TBoundedContext> anemicModel, CommandToAggregate command)
 => Aggregate <TBoundedContext> .CreateInstance(anemicModel, _scope);
예제 #3
0
 .PipeTo(ck => Aggregate <TBoundedContext> .CreateInstance(input, scope))
 // TODO: add changed values
 .PipeTo(a => new AggregateResult <TBoundedContext>(a, command, null));