Esempio n. 1
0
 public async Task <IdentityRole> Delete([FromBody] RoleDeleteCommand command)
 {
     return(await _mediator.Send(command));
 }
 public RoleListViewModel()
 {
     Roles             = new ObservableCollection <Role>(GetAllRoles());
     RoleDeleteCommand = new RoleDeleteCommand(this);
 }
Esempio n. 3
0
        public async Task <IActionResult> DeleteAsync([FromQuery] RoleDeleteCommand roleDeleteCommand)
        {
            var result = await _mediator.Send(roleDeleteCommand);

            return(result ? Json(new { HttpStatusCode.OK }) : (IActionResult)BadRequest());
        }