Exemple #1
0
        public ActionResult SermonsbyCategory(string name)
        {
            var sermonscategory = _uow.Sermons.Find(sc => sc.SermonCategory.SermonName == name);
            var svm             = new SermonViewModel
            {
                Sermons = sermonscategory,
                //SermonCategory = name
                SermonCat = name
            };

            return(View("Index", svm));
        }
Exemple #2
0
        public ActionResult Index()
        {
            var sermon = _uow.Sermons.GetAll();

            ViewBag.SermonCategory = _uow.SermonCategories.GetAll().Select(r => new SermonCategory
            {
                SermonName        = r.SermonName,
                SermonDescription = r.SermonDescription
            });
            var sermonCat = _uow.SermonCategories.GetAll();
            var svm       = new SermonViewModel
            {
                Sermons        = sermon,
                SermonCategory = sermonCat,
                SermonCat      = ""
            };

            return(View(svm));
        }