Given the code ``` public async Task DownloadAllCampaigns(int titleId)
 {
 var data = await (from G in \_dbContext.Gifts
 from U in \_dbContext.Users.Where(d => d.Id == G.RedeemerUserId).DefaultIfEmpty()
 from I in \_dbContext.Issues.Where(d => d.Id == G.ProductId && G.ProductTypeId == 1).DefaultIfEmpty()
 from TS in \_dbContext.TitleSubscriptions.Where(d => d.Id == G.ProductId && G.ProductTypeId == 2).DefaultIfEmpty()
 from T in \_dbContext.Titles.Where(d => d.Id == (I.TitleId == null ? TS.TitleId : I.TitleId)).DefaultIfEmpty()
 where G.Successful.Value && T.Id == titleId && G.BuyerUserId == 2974651 && !string.IsNullOrEmpty(G.OfferName)
 select new TitleSentGifts
 {
 OfferName = G.OfferName,
 ProductName = G.FixedSubEndDate.HasValue ? $"Expiry Date Sub - {G.FixedSubEndDate}" : string.IsNullOrEmpty(I.Name) ? $"{TS.NumberOfIssues} Issues Subs" : I.Name,
 NumberOfIssues = TS.NumberOfIssues == null ? 1 : TS.NumberOfIssues,
 GiftId = G.Id,
 GiftCode = G.GiftCode,
 TitleName = T.Name,
 ReceiverFirstName = G.ReceiverFirstName,
 RedeemerFirstName = U.FirstName,
 RedeemerLastName = U.LastName,
 RedeemerEmail = U.Email,
 Redeemed = G.Redeemed,
 RedeemerUserId = G.RedeemerUserId,
 RedeemedDate = G.RedeemedDate,
 CreatedAt = G.CreatedAt.ToShortDateString(),
 })
 .OrderBy(o => o.OfferName)
 .ToListAsync();
 using (var memoryStream = new MemoryStream())
 using (var streamWriter = new StreamWriter(memoryStream))
 using (var csvWriter = new CsvWriter(streamWriter, CultureInfo.InvariantCulture))
 {
 csvWriter.WriteRecords(data);
 streamWriter.Flush();
 return memoryStream.ToArray();
 }
 }```
user