public Dictionary <Guid, int> DoSave(AppManager appMan, List <BundleWithHeader <IEntity> > items, bool forceSaveAsDraft) { var entitySetToImport = items .Where(entity => entity.Header.Group == null || !entity.Header.Group.SlotIsEmpty) .ToList(); var save = new Eav.WebApi.SaveHelpers.SaveEntities(Log); save.UpdateGuidAndPublishedAndSaveMany(appMan, entitySetToImport, forceSaveAsDraft); return(save.GenerateIdList(appMan.Read.Entities, items)); }
private Dictionary <Guid, int> DoSave(AppManager appMan, List <BundleWithHeader <IEntity> > items, bool forceSaveAsDraft) { // only save entities that are // a) not in a group // b) in a group where the slot isn't marked as empty var entitiesToSave = items .Where(e => e.Header.Group == null || !e.Header.Group.SlotIsEmpty) .ToList(); var save = new Eav.WebApi.SaveHelpers.SaveEntities(Log); save.UpdateGuidAndPublishedAndSaveMany(appMan, entitiesToSave, forceSaveAsDraft); return(save.GenerateIdList(appMan.Read.Entities, items)); }