Created
June 2, 2021 18:50
-
-
Save jvanhoesen/b6e20e70c44430fe05c1e054db5c4a5b to your computer and use it in GitHub Desktop.
Prefetch default implementation vs advanced implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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