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); }
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)); }