.netTiers
Help Wanted! If you are using .netTiers and find it as invaluable as we do, please consider giving back to the .netTiers team by helping with our effort to fully document .netTiers. To help, simply create an account and you will then be able to edit this wiki.
Issue: GetTotalItems() method on an EntityProvider object uses the same SQL as the Get() methods, which results in an entire record set being retrieved when all that is needed is to get a Count of the items in the database table.

Workaround: Call the GetPaged()method directly, but only specify a pageLength of 1. The out parameter of the method will contain the correct count. Example: (Using AdventureWorks DB)

            int retVal;
            TList<Product> prod = DataRepository.ProductProvider.GetPaged(0,1, out retVal);
            return retVal;

This still returns a single entity item (if any exist), but this is at least more efficient than returning an entire table's data to simply get a count.

ScrewTurn Wiki version 2.0.31.