Ejemplo n.º 1
0
        public void Handle(OpenAuctionCommand command)
        {
            var id      = _repository.GetNextId();
            var auction = new Auction(id, command.Product, command.EndDateTime, command.StartingPrice, command.SellerId);

            _repository.Add(auction);
        }
Ejemplo n.º 2
0
 public void Post([FromBody] OpenAuctionCommand command)
 {
     _bus.Dispatch(command);
 }
Ejemplo n.º 3
0
 public void Post(OpenAuctionCommand command)
 {
     _bus.Dispatch(command);
 }
        public void Handle(OpenAuctionCommand command)
        {
            var auction = new Auction(command.StartingPrice, command.SellerId, command.EndDateTime, command.ProductDescription);

            _repository.Add(auction);
        }
Ejemplo n.º 5
0
 public IActionResult Post([FromBody] OpenAuctionCommand command)
 {
     _commandDispatcher.Dispatch <OpenAuctionCommand>(command);
     return(Ok());
 }
 public IActionResult Post([FromBody] OpenAuctionCommand command)
 {
     commandBus.Dispatch(command);
     return(Ok());
 }