Example #1
0
        public async Task <OutToolDTO> GetToolByNameAsync(string toolName)
        {
            var tools = await _toolRepository.GetByName(toolName);

            return(new OutToolDTO()
            {
                Tool = tools.Name
            });
        }
Example #2
0
        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);
        }