Fix ToHashSet() compatibility issue in Receipts page
Changed from using .ToHashSet() extension method (which may not be available in some EF Core versions) to .ToListAsync() followed by creating a HashSet from the list. This ensures compatibility across different EF Core versions while maintaining the same performance characteristics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -171,10 +171,12 @@ namespace MoneyMap.Pages
|
||||
}).ToList();
|
||||
|
||||
// Load matching transactions for each unmapped receipt
|
||||
var transactionsWithReceipts = await _db.Receipts
|
||||
var transactionsWithReceiptsList = await _db.Receipts
|
||||
.Where(r => r.TransactionId != null)
|
||||
.Select(r => r.TransactionId!.Value)
|
||||
.ToHashSet();
|
||||
.ToListAsync();
|
||||
|
||||
var transactionsWithReceipts = new HashSet<long>(transactionsWithReceiptsList);
|
||||
|
||||
var unmappedReceipts = Receipts.Where(r => !r.TransactionId.HasValue).ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user