Skip to content

Instantly share code, notes, and snippets.

@jvanhoesen
Created June 2, 2021 18:50
Embed
What would you like to do?
Prefetch default implementation vs advanced implementation
//Default implementation
public void Prefetch()
{
_InventoryItems.Clear();
foreach (InventoryItem item in PXDatabase.SelectRecords<InventoryItem>())
{
_InventoryItems[item.InventoryID.Value] = item;
}
}
//New Implementation
public void Prefetch()
{
_InventoryItems.Clear();
foreach (InventoryItem item in AACache<InventoryItem>.SelectRecords())
{
_InventoryItems[item.InventoryID.Value] = item;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment