public virtual async Task <IActionResult> RemoveRoleAsync([FromBody][Required] RemoveRole <TIdentity> removeRole, CancellationToken cancellationToken = default) { await this.IdentityManager .RemoveUserRoleAsync(removeRole, cancellationToken); return(this.Ok()); }
/// <summary> /// Delete the role. /// </summary> /// <param name="command">The command.</param> /// <returns>IList<IEvent>.</returns> /// <exception cref="RoleNotFoundException">Id</exception> /// <exception cref="RoleConcurrencyFailureException"></exception> private IList <IEvent> Handle(RemoveRole command) { CheckConcurrencyStamp(command.ConcurrencyCheckStamp); return(new[] { new RoleRemoved(Id, command.UserId, command.CorrelationId) }); }