Пример #1
0
        public ActionResult Index(int id)
        {
            var viewModel = new BlessTheWeb.Models.SinDetailViewModel();
            viewModel.Sin = MvcApplication.CurrentSession.Load<Sin>(id.ToRavenDbId("sins"));
            viewModel.Absolutions =
                MvcApplication.CurrentSession.LuceneQuery<Indulgence>("AllIndulgences").WhereEquals("SinId",
                                                                                                    viewModel.Sin.Id);

            return View(viewModel);
        }
Пример #2
0
        public ActionResult Index(int id)
        {
            var viewModel = new BlessTheWeb.Models.SinDetailViewModel();

            viewModel.Sin         = MvcApplication.CurrentSession.Load <Sin>(id.ToRavenDbId("sins"));
            viewModel.Absolutions =
                MvcApplication.CurrentSession.LuceneQuery <Indulgence>("AllIndulgences").WhereEquals("SinId",
                                                                                                     viewModel.Sin.Id);

            return(View(viewModel));
        }