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); }
IMemento <Order> IActorStore <Order> .Get <TKey>(TKey id) { return(Couch.Get <OrderMemento>(id.ToString())); }