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

            WhatsNearByLocation tmpClass = null;

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

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

            return(obj);
        }
 public WhatsNearByLocation(WhatsNearByLocation objectToCopy)
 {
     Active                = objectToCopy.Active;
     AddressID             = objectToCopy.AddressID;
     Description           = objectToCopy.Description;
     Image                 = objectToCopy.Image;
     Name                  = objectToCopy.Name;
     Phone                 = objectToCopy.Phone;
     Website               = objectToCopy.Website;
     WhatsNearByLocationID = objectToCopy.WhatsNearByLocationID;
 }