public async Task <ResponseDTO> UpdateActions(AmigoTenanttRolPermissionRequest actions) { var role = (await _rolDataAccess.FirstOrDefaultAsync(x => x.Code == actions.CodeRol && x.RowStatus)); CommandResult result = null; switch (actions.TableStatus) { case DTOs.Requests.Common.ObjectStatus.Deleted: var delete = _mapper.Map <AmigoTenanttRolPermissionRequest, DeletePermissionCommand>(actions); result = await _bus.SendAsync(delete); break; case DTOs.Requests.Common.ObjectStatus.Added: var register = _mapper.Map <AmigoTenanttRolPermissionRequest, RegisterPermissionCommand>(actions); result = await _bus.SendAsync(register); break; default: return(ResponseBuilder.InCorrect()); } return(result.IsCorrect ? ResponseBuilder.Correct():ResponseBuilder.InCorrect()); }
public async Task <ResponseDTO> UpdateActions(AmigoTenanttRolPermissionRequest actions) { return(await _AmigoTenantTRoleApplicationService.UpdateActions(actions).ConfigureAwait(false)); }