コード例 #1
0
 private static MeetupAggregate ExecuteCommand(this MeetupAggregate @this, Func <MeetupAggregate> command)
 {
     @this.UpdateNumberOfSeats(SeatsNumber.From(numberOfSeats));
     @this.UpdateLocation(Address.From(address));
     @this.UpdateTime(timeRange);
     @this = command();
     return(@this);
 }
コード例 #2
0
ファイル: MeetupTests.cs プロジェクト: paulopez78/voxel-ddd
        public static void GivenPublishedMeetup(Action <MeetupAggregate> when, Action <MeetupAggregate> then)
        {
            var meetup = new MeetupAggregate(id, title, location);

            meetup.UpdateNumberOfSeats(seats);
            meetup.Publish();
            when(meetup);
            then(meetup);
        }