예제 #1
0
        private IEvent CompleteStory(CompleteStoryCommand command)
        {
            //if (Version == -1)
            //{
            //    throw new StoryNotFoundException();
            //}

            if (IsCompleted)
            {
                throw new StoryCompletedException();
            }

            return(Apply(new StoryCompletedEvent(Id)));
        }
예제 #2
0
 public async Task CompleteStory([FromBody] CompleteStoryCommand completeStoryCommand)
 {
     await _mediator.Send(completeStoryCommand);
 }