public async Task <IActionResult> Put([FromBody] UpdateScopeDto dto, Guid id) { var cmd = new UpdateScopeCommand { Id = id, Description = dto.Description, DisplayName = dto.DisplayName, ClaimTypes = dto.ClaimTypes }; var result = await _sagaBus.InvokeAsync <UpdateScopeCommand, MessageResult>(cmd); if (result.Succeed) { return(Created(Url.Action(), null)); } return(BadRequest(result.Message)); }
public static Scope ToScope(this UpdateScopeCommand command) { return(command.MapTo <UpdateScopeCommand, Scope>()); }