/// <summary>
 /// Gets a list of banner adds.
 /// </summary>
 /// <returns></returns>
 public BannerAdds GetBannerAdds()
 {
     List<BannerAdd> bannerAdds = _context.BannerAdds.ToList();
     BannerAdds listToReturn = new BannerAdds();
     foreach (var add in bannerAdds)
         listToReturn.Add(add);
     return listToReturn;
 }
        /// <summary>
        /// Gets a list of banner adds.
        /// </summary>
        /// <returns></returns>
        public BannerAdds GetBannerAdds()
        {
            List <BannerAdd> bannerAdds   = _context.BannerAdds.ToList();
            BannerAdds       listToReturn = new BannerAdds();

            foreach (var add in bannerAdds)
            {
                listToReturn.Add(add);
            }
            return(listToReturn);
        }
        /// <summary>
        /// Gets the active banner adds.
        /// </summary>
        /// <returns></returns>
        /// <exception cref="System.NotImplementedException"></exception>
        public BannerAdds GetActiveBannerAdds()
        {
            BannerAdds bannerAddsList = new BannerAdds();
            var        bannerAdds     = (from a
                                         in _context.BannerAdds
                                         where a.RotationStart <DateTime.Now &&
                                                                a.RotationEnd> DateTime.Now &&
                                         !a.FileName.Equals("none")
                                         select a).ToList();

            foreach (var add in bannerAdds)
            {
                bannerAddsList.Add(add);
            }
            return(bannerAddsList);
        }
 /// <summary>
 /// Gets the active banner adds.
 /// </summary>
 /// <returns></returns>
 /// <exception cref="System.NotImplementedException"></exception>
 public BannerAdds GetActiveBannerAdds()
 {
     BannerAdds bannerAddsList = new BannerAdds();
     var bannerAdds = (from a
                              in _context.BannerAdds
                              where a.RotationStart < DateTime.Now
                              && a.RotationEnd > DateTime.Now
                              && !a.FileName.Equals("none")
                              select a).ToList();
     foreach (var add in bannerAdds)
     {
         bannerAddsList.Add(add);
     }
     return bannerAddsList;
 }