public RunningNumberCounterCreatedEvent(Guid aggregateId, RunningNumberCounterArea counterArea, string prefix, int initialNumber) : base(aggregateId) { this.CounterArea = counterArea; this.Prefix = prefix; this.InitialNumber = initialNumber; }
private RunningNumberCounterAggregateRoot(Guid runningNumberId, RunningNumberCounterArea counterArea, string prefix, int initialNumber) : this() { var creationEvent = new RunningNumberCounterCreatedEvent(runningNumberId, counterArea, prefix, initialNumber); this.RaiseEvent(creationEvent); }
public AddNextNumberEvent(Guid aggregateId, Guid nextNumberId, RunningNumberCounterArea runningNumberCounterArea, string prefix, int nextNumberInRow) : base( aggregateId) { this.NextNumberId = nextNumberId; this.RunningNumberCounterArea = runningNumberCounterArea; this.Prefix = prefix; this.NextNumberInRow = nextNumberInRow; }
public async Task CreateNewRunningNumberCounterAsync(IDbConnection connection, Guid runningNumberCounterId, RunningNumberCounterArea counterArea, int initialNumber, string prefix) { await connection.InsertAsync(new RunningNumberCounterEntity { RunningNumberCounterId = runningNumberCounterId, CurrentNumber = initialNumber, CounterArea = counterArea, Prefix = prefix }); }
internal async Task <Guid> CreateNewRunningNumberForAsync(RunningNumberCounterArea area) { var runningNumberIdForTasks = RunningNumberCounterCommandHandler.AreaToIdentityMapping[area]; var runningNumbers = this._aggregateRepository.GetById <RunningNumberCounterAggregateRoot>(runningNumberIdForTasks); var newRunningNumberId = this._guidGenerator.GenerateGuid(); runningNumbers.AddNextNumber(newRunningNumberId); await this._aggregateRepository.SaveAsync(runningNumbers); return(newRunningNumberId); }
public CreateRunningNumberCounterCommand(RunningNumberCounterArea counterArea, string prefix, int initialNumber) { this.CounterArea = counterArea; this.Prefix = prefix; this.InitialNumber = initialNumber; }
internal static RunningNumberCounterAggregateRoot Create(Guid runningNumberId, RunningNumberCounterArea counterArea, string prefix, int initialNumber) { return(new RunningNumberCounterAggregateRoot(runningNumberId, counterArea, prefix, initialNumber)); }
public CreateRunningNumberCommand(RunningNumberCounterArea counterArea) { this.CounterArea = counterArea; }