public static Order CreateOpened(AskPlaced askPlaced) { return new Order() { Type = OrderType.Ask, OrderPrice = Domain.Price.CreateUsd(askPlaced.Price), UserId = askPlaced.UserId, Quantity = askPlaced.Quantity, CoinId = askPlaced.CoinId, CreatedAt = askPlaced.CreatedAt, Status = OrderStatus.Opened }; }
public void Handle(AskPlaced askPlaced) { _dbAccess.Add(Order.CreateOpened(askPlaced)); }
public async Task <Unit> Handle(CreateAskCommand request, CancellationToken cancellationToken) { await _messageBroker.Publish(AskPlaced.CreateFrom(request)); return(Unit.Value); }