Exercise - Cached
- In CalcOrderTotalForShipper add Debug.WriteLine to the class constructor.
- Save changes to Git.
- Build and test. (notice that every time you change shipper in the ShowShippers the Debug line of the constructor show in the output)
- In ShowShippers change the call to CalcOrderTotalForShipper, and use Cached<>.
- Save changes to Git.
- Build and test, notice :
- You get the same data for all rows.
- The Debug message for the constructor Appears only once.
- In CalcOrderTotalForShipper Clear the Where and Zero the value of the two local variables.
- Save changes to Git.
- Build and test.
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com