Deserialize() public method

public Deserialize ( BsonDocument bsonDocument ) : AggregateSnapshot
bsonDocument BsonDocument
return CQRSalad.EventSourcing.AggregateSnapshot
Example #1
0
        public async Task <AggregateSnapshot> LoadSnapshot(string aggregateId)
        {
            var snapshot = await GetCollection().Find(_snapshotSerializer.GetIdFilter(aggregateId)).FirstOrDefaultAsync();

            return(snapshot != null?_snapshotSerializer.Deserialize(snapshot) : null);
        }