public ActionResult Index() { var vm = new IndexViewModel(); if(State.RegisteredForEvent()) { vm.SubmittedSessions = Bus.Query(new SubmittedSessions()); } return View(vm.WithUser(CurrentUser)); }
public ActionResult Index(IndexViewModel input) { return Execute(input) .OnSuccess(x => RedirectToAction("Index")) .OnFailure(x => { if(State.RegisteredForEvent()) { input.SubmittedSessions = Bus.Query(new SubmittedSessions()); } return View(input); }); }