Creating orders for gift transactions Can this be improved?

foreach (Gift gift in usedGifts)
{
    foreach (GiftTransaction GiftTransaction in gift.GiftTransactions)
    {
        if (!string.IsNullOrEmpty(giftTransaction.GiftId) &amp;&amp;
            !orderList.Where(b =&gt; b.GiftId == giftTransaction.GiftId).Any())
        {
            Order order = OrderHelper.PopulateSingleOrder(orderRepository, sessionRepository, giftTransaction.GiftId);
            if (order != null)
                orderList.Add(order);
        }
    }
    giftReferenceList.Add(gift.GiftReference);
}
I'm not sure if it will make your query faster but here is my take on it:

If I read the code correctly you want to create orders for all gift transactions related to gift ids which are not covered by an order yet.

usedGifts.SelectMany(g =&gt; g.GiftTransactions)
         .Select(gt =&gt; gt.GiftId)
         .Where(gi =&gt; !string.IsNullOrEmpty(gi))
         .Except(orderList.Select(o =&gt; o.GiftId)) // This will yield all gift ids which are not covered by an order
         .Select(gi =&gt; OrderHelper.PopulateSingleOrder(orderRepository, sessionRepository, gi))  // generate the orders
         .Where(o =&gt; o != null)
         .ToList();


Unfortunately this requires an extra pass over the usedGifts list to add all the references

giftReferenceList.AddRange(usedGifts.Select(g =&gt; g.GiftReference));