Example #1
0
        public async Task <IActionResult> Post()
        {
            var orderId = Guid.NewGuid().ToString();
            await _orderEndPoint.SendLocal(new CreateOrder
            {
                OrderId = orderId,
                UserId  = _userIdentityProvider.CurrentUserId()
            });

            await _orderEndPoint.Send(new PlaceOrder { OrderId = orderId });

            return(Ok());
        }
 public override async Task OnConnectedAsync()
 {
     await Groups.AddAsync(Context.ConnectionId, _userIdentityProvider.CurrentUserId());
 }
 private void AssumeUserIdentityProviderIsInitialised()
 {
     _userIdentityProvider = Substitute.For <IUserIdentityProvider>();
     _userIdentityProvider.CurrentUserId().Returns(UserId);
 }