예제 #1
0
        private List <BannerDetailsModel> GetBannerList()
        {
            List <BannerDetailsModel> results = new List <BannerDetailsModel>();
            List <BANNER>             data    = new List <BANNER>();

            try
            {
                data = DB.BANNER
                       .Where(o => o.DISABLE == false)
                       .OrderByDescending(o => o.BUD_DT).ThenByDescending(g => g.SQ)
                       .ToList();
                FileModule fileModule = new FileModule();
                using (var bannerModule = new BannerModule())
                {
                    foreach (var d in data)
                    {
                        PublicMethodRepository.HtmlDecode(d);
                        BannerDetailsModel temp = bannerModule.DoGetDetailsByID(d.ID);
                        temp.Files = fileModule.GetFiles((int)d.ID, "Banner", "F");
                        results.Add(temp);
                    }
                }
                fileModule.Dispose();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(results);
        }
예제 #2
0
        public void FileModule_Dispose_WhenNotStarted_DoesNotThrow()
        {
            var module = new FileModule(UrlPath.Root, new MockFileProvider());

            Assert.DoesNotThrow(() => module.Dispose());
        }