예제 #1
0
 protected override void Initialize(HttpControllerContext controllerContext)
 {
     base.Initialize(controllerContext);     // very important!!!
     Log.Rename("2sEntC");
     EavEntitiesController = new Eav.WebApi.EntitiesController(Log);
     ((Serializer)EavEntitiesController.Serializer).Sxc = SxcInstance;
 }
예제 #2
0
        private Dictionary <Guid, int> SaveOldFormatKeepTillReplaced(int appId,
                                                                     List <BundleWithHeader <EntityWithLanguages> > items,
                                                                     bool partOfPage,
                                                                     bool forceDraft)
        {
            Log.Add($"SaveAndProcessGroups(..., appId:{appId}, items:{items?.Count}), partOfPage:{partOfPage}, forceDraft:{forceDraft}");

            // first, save all to do it in 1 transaction
            // note that it won't save the SlotIsEmpty ones, as these won't be needed
            var eavEntitiesController = new Eav.WebApi.EntitiesController(Log);

            return(eavEntitiesController.SaveMany(appId, items, partOfPage, forceDraft));
        }
예제 #3
0
 private void InitEavAndSerializer()
 {
     // Improve the serializer so it's aware of the 2sxc-context (module, portal etc.)
     _entitiesController = new Eav.WebApi.EntitiesController(App.AppId);
     ((Serializer)_entitiesController.Serializer).Sxc = Sexy;
 }