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

            RetsTaskStatus tmpClass = null;

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

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

            return(obj);
        }
 public RetsTaskStatus(RetsTaskStatus objectToCopy)
 {
     RetsStatusID     = objectToCopy.RetsStatusID;
     RetsTaskID       = objectToCopy.RetsTaskID;
     RetsTaskStatusID = objectToCopy.RetsTaskStatusID;
     TaskCompleteTime = objectToCopy.TaskCompleteTime;
 }