Ejemplo n.º 1
0
        public IEventPublicationRecord MarkAsComplete(Guid publicationId)
        {
            var record = safelyFetchRecord(publicationId);

            record.Status  = EventPublicationStatus.Complete;
            record.Updated = DateTime.UtcNow;

            _db.SaveChanges();

            return(record);
        }
Ejemplo n.º 2
0
        public IEventPublicationRecord AssociateQueryReference(Guid publicationId, IdentifierQueryReference reference)
        {
            var record = safelyFetchRecord(publicationId);

            record.Updated = DateTime.UtcNow;

            if (record.QueryReferences == null)
            {
                record.QueryReferences = new List <IdentifierQueryReference>();
            }

            reference.Id = Guid.NewGuid();

            record.QueryReferences.Add(reference);

            _db.SaveChanges();

            return(record);
        }