Exemple #1
0
        public bool Delete(TDTOChiave chiave, Guid creatorIdentifier)
        {
            var ret = InnerDelete(chiave);

            if (creatorIdentifier != MyIdentifier)
            {
                return(ret);
            }
            if (Orchestrator != null && ret)
            {
                Orchestrator.AppendNotification(new DTONotification
                {
                    CreationDateTime = DateTime.UtcNow, CreatorIdentifier = MyIdentifier, Key =
                        JsonConvert.SerializeObject(chiave), NotificationDTOType = typeof(TDTOData).FullName, NotificationType = NotificationType.Delete, Status = PendingNotificationStatus.Queued
                });
            }
            return(ret);
        }
Exemple #2
0
        public TDTOChiave UpdateOrInsert(TDTOData dato, Guid creatorIdentifier)
        {
            var ret = InnerUpdateOrInsert(dato);

            if (creatorIdentifier != MyIdentifier)
            {
                return(ret);
            }
            if (Orchestrator != null)
            {
                Orchestrator.AppendNotification(new DTONotification
                {
                    CreationDateTime  = DateTime.UtcNow,
                    CreatorIdentifier = MyIdentifier,
                    Key =
                        JsonConvert.SerializeObject(dato.Identifier),
                    NotificationDTOType = typeof(TDTOData).FullName,
                    NotificationType    = NotificationType.UpdateOrInsert,
                    Status = PendingNotificationStatus.Queued
                });
            }
            return(ret);
        }