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

            SecurityQuestion tmpClass = null;

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

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

            return(obj);
        }
 public SecurityQuestion(SecurityQuestion objectToCopy)
 {
     Active             = objectToCopy.Active;
     Question           = objectToCopy.Question;
     SecurityQuestionID = objectToCopy.SecurityQuestionID;
 }