public static TrackingNumber Load(Int32 trackingNumberId, bool useCache)
        {
            if (trackingNumberId == 0)
            {
                return(null);
            }
            TrackingNumber trackingNumber = null;
            string         key            = "TrackingNumber_" + trackingNumberId.ToString();

            if (useCache)
            {
                trackingNumber = ContextCache.GetObject(key) as TrackingNumber;
                if (trackingNumber != null)
                {
                    return(trackingNumber);
                }
            }
            trackingNumber = new TrackingNumber();
            if (trackingNumber.Load(trackingNumberId))
            {
                if (useCache)
                {
                    ContextCache.SetObject(key, trackingNumber);
                }
                return(trackingNumber);
            }
            return(null);
        }
        public static bool Delete(Int32 trackingNumberId)
        {
            TrackingNumber trackingNumber = new TrackingNumber();

            if (trackingNumber.Load(trackingNumberId))
            {
                return(trackingNumber.Delete());
            }
            return(false);
        }