public Project GetCurrentProject() { if (session.TryGet(SessionKey.CurrentProjectIdentity, out IIdentity <Project> id)) { return(data.Get(id)); } var project = wrapped.GetCurrentProject(); if (project != null) { session.Set(SessionKey.CurrentProjectIdentity, project.GetIdentity()); } return(project); }