public static OrderStatus Load(Int32 orderStatusId, bool useCache)
        {
            if (orderStatusId == 0)
            {
                return(null);
            }
            OrderStatus orderStatus = null;
            string      key         = "OrderStatus_" + orderStatusId.ToString();

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

            if (orderStatus.Load(orderStatusId))
            {
                return(orderStatus.Delete());
            }
            return(false);
        }