コード例 #1
0
        public static List <URLEntity> GetURLs(List <URLEntity> _URLs, int ModuleID, string Entity, int EntityID)
        {
            if (_URLs == null)     //Check if we've already persisted the object once
            {
                if (ModuleID != 0) //Check if data even exists in db yet. Product.ModuleID == 0 indicates a new category
                {
                    _URLs = URLFactory.GetURLs(ModuleID, EntityID, Entity);
                }

                if (_URLs == null) //No URLs are available yet
                {
                    _URLs = new List <URLEntity>();
                }
            }

            return(_URLs);
        }