public async Task <AtisLogTranDTO> LiberarSecuencial(ManageSequential manageSequential) { AtisLogTran infoDocument = _unitOfWork.AtisLogTranRepository.GetAll().FirstOrDefault( s => s.Canal.Contains(manageSequential.Channel) && s.Tipo.Contains(manageSequential.TypeDocument) && s.Secuencial.Contains(manageSequential.Sequential) && !string.IsNullOrEmpty(s.NumeroDocumento)); var result = new AtisLogTranDTO { Canal = manageSequential.Channel, Secuencial = manageSequential.Sequential, Tipo = manageSequential.TypeDocument }; if (infoDocument != null) { await _unitOfWork.SwitchAtiscodeProceduresRepository .LiberarSecuencial(manageSequential.Channel, manageSequential.Sequential, manageSequential.TypeDocument); result.NumeroDocumento = infoDocument.NumeroDocumento; } return(result); }
public async Task <IActionResult> Post(ManageSequential manageSequential) { AtisLogTranDTO result = await _switchAtiscodeProceduresService.LiberarSecuencial(manageSequential); var apiResponse = new ApiResponse <AtisLogTranDTO>(result); return(Ok(apiResponse)); }