示例#1
0
        public Guid Save(CommandMetaData commandMetaData)
        {
            DynamicDataStore store = this._changeApprovalDynamicDataStoreFactory.GetStore("EPiServer.ChangeApproval.Core.Internal.CommandMetaData");

            if (store == null)
            {
                return(Guid.Empty);
            }
            lock (_lock)
            {
                var identity = store.Save(commandMetaData);
                return(identity == null ? Guid.Empty : identity.ExternalId);
            }
        }
示例#2
0
        public bool SaveSettings(EmployeeSettingsModel data)
        {
            DynamicDataStore store = DynamicDataStoreFactory.Instance.GetStore(StoreName);

            if (store == null)
            {
                store = DynamicDataStoreFactory.Instance.CreateStore(StoreName, typeof(EmployeeSettingsModel));
            }
            else
            {
                store.DeleteAll();
            }
            Identity id = store.Save(data);

            return(id.ExternalId != Guid.Empty);
        }
示例#3
0
        private void ContentSecurityRepository_ContentSecuritySaving(object sender, ContentSecurityCancellableEventArgs e)
        {
            var entry = new SecurityLogEntry
            {
                Id               = Identity.NewIdentity(Guid.NewGuid()),
                ContentLink      = e.ContentLink,
                ContentName      = contentLoader.Get <IContent>(e.ContentLink).Name,
                SecuritySaveType = e.SecuritySaveType,
                Entries          = e.ContentSecurityDescriptor.Entries.Select(ace => ACE.ConvertFrom(ace)).ToArray(),
                IsInherited      = e.ContentSecurityDescriptor.IsInherited,
                ModifiedBy       = HttpContext.Current.User.Identity.Name,
                Modified         = DateTime.Now
            };

            DynamicDataStore store = DynamicDataStoreFactory.Instance
                                     .CreateStore("SecurityLogEntry", typeof(SecurityLogEntry));

            store.Save(entry);
        }
 public void Save(Rate rate)
 {
     _store.Save(rate);
 }
示例#5
0
 public void Save(Review data)
 {
     _store.Save(data);
 }
示例#6
0
        public void Save()
        {
            DynamicDataStore store = GetStore();

            store.Save(this);
        }
示例#7
0
        public Identity Insert(TDDS data)
        {
            var identity = _store.Save(data);

            return(identity);
        }
 /// <summary>
 /// Save a PageChart object
 /// </summary>
 /// <param name="pageCharts"></param>
 public void Save(PageCharts pageCharts)
 {
     _store.Save(pageCharts);
 }
示例#9
0
 public Identity Add(Comment comment)
 {
     comment.Time = DateTime.UtcNow;
     return(_commentStore.Save(comment));
 }