private static void GetAllServiceForRental() { RentalManager rentalManager = new RentalManager(new EfRentalDal()); var result = rentalManager.GetAllService(); Console.WriteLine("\n------------------- GetAllService() Test-------------------\n"); string returnDate; if (result.Success == true) { Console.WriteLine(result.Message); foreach (var rental in result.Data) { returnDate = (rental.ReturnDate != null) ? (rental.ReturnDate.ToString()) : ("\n Araç teslim edilmemiştir"); Console.WriteLine(rental.Id + " - Araba No: " + rental.CarId + " Müşteri No: " + rental.CustomerId + " Araç Teslim Alma Tarihi: " + rental.RentDate + "Araç İade Tarihi: " + returnDate); Console.WriteLine("\n"); } } else { Console.WriteLine(result.Message); } }