public async Task <IdentityRole> Delete([FromBody] RoleDeleteCommand command) { return(await _mediator.Send(command)); }
public RoleListViewModel() { Roles = new ObservableCollection <Role>(GetAllRoles()); RoleDeleteCommand = new RoleDeleteCommand(this); }
public async Task <IActionResult> DeleteAsync([FromQuery] RoleDeleteCommand roleDeleteCommand) { var result = await _mediator.Send(roleDeleteCommand); return(result ? Json(new { HttpStatusCode.OK }) : (IActionResult)BadRequest()); }