public async Task <OutToolDTO> GetToolByNameAsync(string toolName) { var tools = await _toolRepository.GetByName(toolName); return(new OutToolDTO() { Tool = tools.Name }); }
public async Task <OutOperationDTO> CreateOperationAsync(InOperationDTO inOperationDto) { var oOperation = OperationMapping.InDTOToOperation(inOperationDto); oOperation.Tool = await _toolRepository.GetByName(inOperationDto.Tool); var operation = await _operationRepository.Create(oOperation); var outOperationDto = OperationMapping.OperationToOutDTO(operation); return(outOperationDto); }