SenseNet.Messaging.Event.Save C# (CSharp) Method

Save() private method

private Save ( ) : void
return void
        private void Save()
        {
            using (var context = new DataHandler())
            {
                context.Events.InsertOnSubmit(this);
                context.SubmitChanges();
            }
        }

Usage Example

Example #1
0
        internal static void CreateAndSave(string contentPath, int creatorId, int lastModifierId, NotificationType type, string who, DateTime?when)
        {
            if (type != NotificationType.MovedFrom && type != NotificationType.MovedTo)
            {
                if (!IsSubscriptionExist(contentPath))
                {
                    return;
                }
            }

            var @event = new Event
            {
                ContentPath      = contentPath,
                NotificationType = type,
                Who            = who,
                CreatorId      = creatorId,
                LastModifierId = lastModifierId,
            };

            if (when.HasValue)
            {
                @event.When = when.Value;
            }
            @event.Save();
        }
All Usage Examples Of SenseNet.Messaging.Event::Save