private async Task <TestDriveInfo> getDriveInfo(TestDrives testDrives) { TestDriveInfo info = new TestDriveInfo(); info.date = testDrives.date; User user = await _context.users.FirstOrDefaultAsync(u => u.idUser == testDrives.userId); Car car = await _context.Cars.FirstOrDefaultAsync(u => u.idCar == testDrives.carId); info.carName = car.mark + " " + car.model + " " + car.built; info.clientFio = user.name; return(info); }