示例#1
0
        public ActionResult Archive(int year, int month)
        {
            AlbumComplexModel model = new AlbumComplexModel();

            model.Albums = unitOfWork.AlbumRepository.GetAlbums(filter:(Album a) => (a.Published && a.CreatedOn.Year == year && a.CreatedOn.Month == month));
            model.ArchiveEntries = unitOfWork.AlbumRepository.GetArchive();

            return View("Index", model);
        }
示例#2
0
        // GET: Photos
        public ActionResult Index()
        {
            var firstDay = DateTime.Today.AddDays(-30);
            AlbumComplexModel model = new AlbumComplexModel();

            model.Albums = unitOfWork.AlbumRepository.GetAlbums(filter:(Album a) => (a.Published && a.CreatedOn >= firstDay), includeProp:true);
            model.ArchiveEntries = unitOfWork.AlbumRepository.GetArchive();

            return View(model);
        }