Пример #1
0
        public void Store(IMemento <Order> actor)
        {
            var id  = KeyAccessor.GetId(actor.Retrieve());
            var old = Couch.Get <OrderMemento>(id) as CouchDocument;

            if (old != null)
            {
                (actor as CouchDocument).DocumentRevision = old.DocumentRevision;
            }
            Couch.Persist(id, actor);
        }
Пример #2
0
 IMemento <Order> IActorStore <Order> .Get <TKey>(TKey id)
 {
     return(Couch.Get <OrderMemento>(id.ToString()));
 }