private void InitEavAndSerializer() { // Improve the serializer so it's aware of the 2sxc-context (module, portal etc.) _entitiesController = new EntitiesController(App.AppId); _entitiesController.SetUser(Environment.Dnn7.UserIdentity.CurrentUserIdentityToken); ((Serializer)_entitiesController.Serializer).Sxc = SxcContext; }
private void InitEavAndSerializer(int?appId = null) { // Improve the serializer so it's aware of the 2sxc-context (module, portal etc.) _entitiesController = new EntitiesController(appId ?? App.AppId); _entitiesController.SetUser(Environment.Dnn7.UserIdentity.CurrentUserIdentityToken); // only do this if we have a real context - otherwise don't do this if (!appId.HasValue) { ((Serializer)_entitiesController.Serializer).Sxc = SxcContext; } }