Q:

Efficient Way for Finding Reference Object in LINQ to SQL

I have a payment system as shown below. The payment can be made through multiple gift coupons. The gift coupons are issued along with a purchase. The customer can make use of this gift coupon for future purchase. When a Payment is made through gift coupon, the UsedForPaymentID column in GiftCoupon table will be updated with that PaymentID (for the giftcoupon ID). PaymentID is a foreign key in GiftCoupon table.
I need to write a method: 
public DateTime GetPaymentDate(int GiftCouponID) 

This method will find the date on which a payment is made using the gift coupon.
For achieving this, I can do the following steps

Find the GiftCoupon object using GiftCouponID (from GiftCoupon repository)
Find the PaymentID from the GiftCoupon object. Store it in @PID variable
Using the @PID variable find the Payment object (from Payment repository)
Find the PaymentDate from Payment object

Is there a easier/efficient way of doing this in LINQ to SQL?

A:

var c = context.GiftCoupons.FirstOrDefault(gc => gc.GiftCouponID == GiftCouponID);
if (c != null && c.Payment != null)
return c.Payment.PaymentDate

