Ejemplo n.º 1
0
        public virtual async Task <IActionResult> RemoveRoleAsync([FromBody][Required] RemoveRole <TIdentity> removeRole, CancellationToken cancellationToken = default)
        {
            await this.IdentityManager
            .RemoveUserRoleAsync(removeRole, cancellationToken);

            return(this.Ok());
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Delete the role.
 /// </summary>
 /// <param name="command">The command.</param>
 /// <returns>IList&lt;IEvent&gt;.</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) });
 }