Ejemplo n.º 1
0
        public bool Create(SnapshotRecord snapshot)
        {
            var resultTask = _dbConnection.ExecuteAsync(
                  @"insert into SnapshotEntity(AggregateRootId,Versions,TimeStamp,Datas) values(@AggregateRootId,@Versions,@TimeStamp,@Datas)",
                  snapshot);

            return resultTask.Result == 1;
        }
Ejemplo n.º 2
0
        public Snapshot Create(SnapshotRecord snapshot)
        {
            var aggregateRoot = _binarySerializer.Deserialize<IAggregateRoot>(snapshot.Datas);

            return new Snapshot(aggregateRoot);
        }