public static ShowcaseItemMetricHistorical GetByID(int ShowcaseItemMetricHistoricalID, IEnumerable <string> includeList = null)
        {
            ShowcaseItemMetricHistorical obj = null;
            string key = cacheKeyPrefix + ShowcaseItemMetricHistoricalID + GetCacheIncludeText(includeList);

            ShowcaseItemMetricHistorical tmpClass = null;

            if (Cache.IsEnabled)
            {
                if (Cache.IsEmptyCacheItem(key))
                {
                    return(null);
                }
                tmpClass = Cache[key] as ShowcaseItemMetricHistorical;
            }

            if (tmpClass != null)
            {
                obj = tmpClass;
            }
            else
            {
                using (Entities entity = new Entities())
                {
                    IQueryable <ShowcaseItemMetricHistorical> itemQuery = AddIncludes(entity.ShowcaseItemMetricHistorical, includeList);
                    obj = itemQuery.FirstOrDefault(n => n.ShowcaseItemMetricHistoricalID == ShowcaseItemMetricHistoricalID);
                }
                Cache.Store(key, obj);
            }

            return(obj);
        }
 public ShowcaseItemMetricHistorical(ShowcaseItemMetricHistorical objectToCopy)
 {
     ClickTypeID    = objectToCopy.ClickTypeID;
     Date           = objectToCopy.Date;
     ShowcaseItemID = objectToCopy.ShowcaseItemID;
     ShowcaseItemMetricHistoricalID = objectToCopy.ShowcaseItemMetricHistoricalID;
     TotalCount = objectToCopy.TotalCount;
 }