public async Task <ActionResult <EmployeeTaskDto> > GetTaskByTaskName([FromQuery(Name = "TaskName")] string TaskName) { if (String.IsNullOrWhiteSpace(TaskName)) { return(NotFound()); } var employeeTask = await _employeeTaskRepository.GetOneTaskAsync(TaskName); if (employeeTask == null) { return(NotFound()); } var employeeTaskDtos = _mapper.Map <EmployeeTaskDto>(employeeTask); return(Ok(employeeTaskDtos)); }