Ejemplo n.º 1
0
        public ActionResult List()
        {
            var viewModel = new NewsletterListViewModel
            {
                Newsletters = GetDatabase().GetAll <Newsletter>(),
            };

            return(View(viewModel));
        }
        public ActionResult List()
        {
            var viewModel = new NewsletterListViewModel
            {
                Newsletters = GetDatabase().GetAll<Newsletter>(),
            };

            return View(viewModel);
        }
        public ActionResult List()
        {
            var viewModel = new NewsletterListViewModel
            {
                Newsletters = _newsletterService.GetAll(),
            };

            return(View(viewModel));
        }
        public ActionResult List()
        {
            var viewModel = new NewsletterListViewModel
            {
                Newsletters = GetDatabase().GetAll <Newsletter>(),
            };

            var db      = GetDatabase();
            var setting = db.GetAll <Settings>()
                          .FirstOrDefault(x => x.Key == Constants.SettingKeys.NewsLetterFormatKey);

            ViewBag.NewsLetterFormat = setting == null
                ? Constants.DefaultInitValues[Constants.SettingKeys.NewsLetterFormatKey]
                : setting.Value;

            return(View(viewModel));
        }