/// <summary> /// Add the serialized controller to the session and the storage type to the ViewBag /// to be posted such that PersistentControllerActivator can read it. /// </summary> public static void SaveSession(this IPersistentController inst) { inst.ViewBag.SessionStorage = ViewBagSessionStorage(inst, Storage.Session); inst.HttpContext.Session.Set(GetStorageID(inst), StorageImplementation.Bytes(inst)); }