コード例 #1
0
 /// <summary>
 /// Makes the snapshots.
 /// </summary>
 /// <param name="aggregateTypes">The aggregate types.</param>
 public void MakeSnapshots(IEnumerable <Type> aggregateTypes)
 {
     foreach (var item in _snaphotQuery.GetAggregatesToSnapshot(aggregateTypes))
     {
         var aggregate = _repository.GetByID(item.Item1, item.AggregateID, AggregateRootQueryOptions.UseNullAggregates);
         if (aggregate != null)
         {
             _repository.MakeSnapshot(aggregate);
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Makes the snapshot.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="aggregate">The aggregate.</param>
 public static void MakeSnapshot(this IAggregateRootRepository repository, AggregateRoot aggregate)
 {
     repository.MakeSnapshot(aggregate, null);
 }