ToSic.SexyContent.ContentGroup.SaveChangedLists C# (CSharp) Method

SaveChangedLists() private method

private SaveChangedLists ( int?[]>.Dictionary values ) : void
values int?[]>.Dictionary
return void
        private void SaveChangedLists(Dictionary<string, int?[]> values)
        {
            // ensure that there are never more presentations than values
            if (values.ContainsKey(cPresentation))
            {
                var contentCount = Content.Count;
                if (values.ContainsKey(cContent))
                    contentCount = values[cContent].Length;
                if (values[cPresentation].Length > contentCount)
                    throw new Exception("Presentation may not contain more items than Content.");
            }

            var context = EavDataController.Instance(_zoneId, _appId).Entities; // EavContext.Instance(_zoneId, _appId);
            context.UpdateEntity(_contentGroupEntity.EntityGuid, values);

            // Refresh content group entity (ensures contentgroup is up to date)
            _contentGroupEntity =
                new ContentGroupManager(_zoneId, _appId).GetContentGroup(_contentGroupEntity.EntityGuid)._contentGroupEntity;
        }