public async Task <IActionResult> Create([FromBody] RegisterUserModel model)
        {
            await _createAccountCommandHandler.ExecuteAsync(new CreateAccount
            {
                Email    = model.Email,
                Password = model.Password,
                Country  = model.Country,
                Province = model.Province,
                IP       = HttpContext.Connection.RemoteIpAddress?.ToString()
            });

            return(Created(string.Empty, null));
        }
Esempio n. 2
0
        public virtual Task DispatchAsync <TCommand>(TCommand command, CancellationToken cancellationToken) where TCommand : ICommand
        {
            IAsyncCommandHandler <TCommand> handler = this.Resolve <TCommand>();

            return(handler.ExecuteAsync(command, cancellationToken));
        }