public ActionResult Index() { var model = Session[Definitions.RELEASE_ORCHSTRATION_KEY] as ReleaseOrchstrationModel; if (null == model) { model = new ReleaseOrchstrationModel() { Title = "UI Design Demo (BKC Release Orchestration)" }; _UpdateSessionModel(model); } return(View(model)); }
private void _UpdateSessionModel(ReleaseOrchstrationModel model) { lock (_updateModelSyncObj) { for (int i = 0; i < 3; ++i) { try { try { Session.Remove(Definitions.RELEASE_ORCHSTRATION_KEY); } catch { } Session[Definitions.RELEASE_ORCHSTRATION_KEY] = model; } catch { } } } }