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

            UserLanguageSpoken tmpClass = null;

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

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

            return(obj);
        }
 public UserLanguageSpoken(UserLanguageSpoken objectToCopy)
 {
     LanguageID           = objectToCopy.LanguageID;
     UserID               = objectToCopy.UserID;
     UserLanguageSpokenID = objectToCopy.UserLanguageSpokenID;
 }