public static async Task Move(Guid id, BoardSections section) { var aggregate = await _aggregateRepository.LoadAsync <EventSourcingTaskApp.Core.Task>(id); aggregate.Move(section, "Ahmet KÜÇÜKOĞLU"); await _aggregateRepository.SaveAsync(aggregate); }
public async Task <IActionResult> Move(Guid id, [FromForm] BoardSections section) { var aggregate = await _aggregateRepository.LoadAsync <Core.Task>(id); aggregate.Move(section, "Ahmet KÜÇÜKOĞLU"); await _aggregateRepository.SaveAsync(aggregate); return(Ok()); }
public void Move(BoardSections section, string movedBy) { if (Version == -1) { throw new TaskNotFoundException(); } if (IsCompleted) { throw new TaskCompletedException(); } Apply(new MovedTask { TaskId = Id, MovedBy = movedBy, Section = section }); }