Can this be improved?
foreach (Gift gift in usedGifts)
{
foreach (GiftTransaction GiftTransaction in gift.GiftTransactions)
{
if (!string.IsNullOrEmpty(giftTransaction.GiftId) &&
!orderList.Where(b => b.GiftId == giftTransaction.GiftId).Any())
{
Order order = OrderHelper.PopulateSingleOrder(orderRepository, sessionRepository, giftTransaction.GiftId);
if (order != null)
orderList.Add(order);
}
}
giftReferenceList.Add(gift.GiftReference);
}
!orderList.Where(b => b.GiftId == giftTransaction.GiftId).Any()
with!orderList.Any(b => b.GiftId == giftTransaction.GiftId)
for what it's worth. \$\endgroup\$