Exemple #1
0
        public void AddUserOrganization(Guid userId, Guid organizationId)
        {
            userContext.CheckPermission(Permissions.UserMaintenance);

            ICommand command = new AddUserOrganizationCommand(userId, organizationId);

            commandBus.Value.Send(Envelope.Create(command));
        }
        public async Task <Organization> AddUser([FromRoute] int id, [FromQuery] int userId, CancellationToken cancellationToken)
        {
            var command = new AddUserOrganizationCommand(id, userId);

            return(await _mediator.Send(command, cancellationToken));
        }