示例#1
0
            public IUnitOfWork Create(params object[] parameters)
            {
                MemoryUnitOfWork memoryUnitOfWork = new MemoryUnitOfWork();

                memoryUnitOfWork.UseRepository(new MemoryRepository <OrderDto>());
                return(memoryUnitOfWork);
            }
示例#2
0
            public IUnitOfWork Create(params object[] parameters)
            {
                if (parameters == null)
                {
                    throw new ArgumentNullException(nameof(parameters));
                }

                IEventStore <uint, Event <uint> > eventStore = parameters[0] as IEventStore <uint, Event <uint> >;

                MemoryUnitOfWork memoryUnitOfWork = new MemoryUnitOfWork();

                memoryUnitOfWork.UseRepository(new MemoryEventAggregateRepository <OrderAggregate>(eventStore));
                return(memoryUnitOfWork);
            }