public void Bootstrap(IConfiguration configure)
                {
                    // TODO (Cameron): This is required in order to check the persisted events. Maybe give this some thought...?
                    configure.AggregateRoot <Subject>().ToReconstituteUsing(() => new Subject());

                    configure.ValueObject <Data>()
                    .ToMapToEvent <DataProcessed>((data, @event) => @event.DataValue = data.Value, @event => new Data(@event.DataValue));
                }
                public void Bootstrap(IConfiguration configure)
                {
                    // TODO (Cameron): This is required in order to check the persisted events. Maybe give this some thought...?
                    configure.AggregateRoot <Subject>().ToReconstituteUsing(() => new Subject());

                    configure.ValueObject <NaturalKey>()
                    .ToMapToEvent <NewSubject>((key, @event) => @event.NaturalKeyValue = key.Value, @event => new NaturalKey(@event.NaturalKeyValue));
                }
                public void Bootstrap(IConfiguration configure)
                {
                    // TODO (Cameron): This is required in order to check the persisted events. Maybe give this some thought...?
                    configure.AggregateRoot <Subject>().ToReconstituteUsing(() => new Subject());

                    configure.Entity <Thing>()
                    .ToMapToEvent <NewSubject>((thing, @event) => @event.ThingValue = thing.Value, @event => new Thing(@event.ThingValue));
                }
示例#4
0
        public void Bootstrap(IConfiguration configure)
        {
            configure.AggregateRoot <Schedule>().ToReconstituteUsing(() => new Schedule());

            configure.ValueObject <PointInTime>()
            .ToMapToEvent <ScheduleCreated>(
                (pointInTime, @event) => @event.PointInTimeEpochMinutes = pointInTime.EpochMinutes,
                @event => new PointInTime(@event.PointInTimeEpochMinutes))
            .ToUseValueObjectSerializer(
                pointInTime => pointInTime.EpochMinutes.ToString(),
                epochMinutes => new PointInTime(long.Parse(epochMinutes, CultureInfo.InvariantCulture)));

            configure.Entity <Task>().ToMapToEvent <ScheduleTaskAdded>(
                (task, @event) => @event.TaskId = task.Id,
                @event => new Task(@event.TaskId));
        }
示例#5
0
 public void Bootstrap(IConfiguration configure)
 {
     configure.AggregateRoot <Subject>()
     .ToUseNaturalKey(subject => subject.NaturalKey)
     .ToReconstituteUsing(() => new Subject());
 }
示例#6
0
 public void Bootstrap(IConfiguration configure)
 {
     configure.AggregateRoot <Subject>().ToReconstituteUsing(() => new Subject());
 }
示例#7
0
 public void Bootstrap(IConfiguration configure)
 {
     configure.AggregateRoot <Bug0043.Car>().ToReconstituteUsing(() => new Bug0043.Car());
     configure.AggregateRoot <Bug0064.Thing>().ToReconstituteUsing(() => new Bug0064.Thing());
 }
示例#8
0
 public void Bootstrap(IConfiguration configure)
 {
     configure.AggregateRoot <Car>().ToUseNaturalKey(car => car.OtherRegistration);
 }
示例#9
0
 public void Bootstrap(IConfiguration configure)
 {
     configure.AggregateRoot <Subject>().ToUseNaturalKey(subject => subject.NaturalKey);
     configure.ValueObject <Key>().ToUseEqualityComparer(new KeyEqualityComparer());
 }
示例#10
0
 public void Bootstrap(IConfiguration configure)
 {
     configure.AggregateRoot <Subject>().ToUseNaturalKey(subject => subject.SecondNaturalKey);
 }
示例#11
0
 public void Bootstrap(IConfiguration configure)
 {
     // TODO (Cameron): This is required in order to check the persisted events. Maybe give this some thought...?
     configure.AggregateRoot <Subject>().ToReconstituteUsing(() => new Subject());
 }