Beispiel #1
0
        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());
        }
Beispiel #3
0
        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
            });
        }