예제 #1
0
        public async Task <IActionResult> Rebuild([FromBody] RebuildProjectionRequest request)
        {
            Guard.Against.Null(request, nameof(request));

            var command = RebuildProjection.Create(
                request.ProjectionName
                );

            await commandBus.Send(command);

            return(Accepted());
        }
예제 #2
0
    public async Task <IActionResult> Rebuild([FromBody] RebuildProjectionRequest request)
    {
        if (request == null)
        {
            throw new ArgumentNullException(nameof(request));
        }

        var command = RebuildProjection.Create(
            request.ProjectionName
            );

        await commandBus.Send(command);

        return(Accepted());
    }
예제 #3
0
 public void Handle(RebuildProjection command)
 {
     Update(command.Id, ar => ar.Replay(command.Hash));
 }