예제 #1
0
 /// <summary>
 /// Store aggregate domain Events to persistent object.
 /// </summary>
 /// <typeparam name="TAggregateRoot"><see cref="IAggregateRoot"/></typeparam>
 /// <typeparam name="TPersistentObject"><see cref="IPersistentObject"/></typeparam>
 public static TypeAdapterSetter <TAggregateRoot, TPersistentObject> MapDomainEvent <TAggregateRoot, TPersistentObject>(this TypeAdapterSetter <TAggregateRoot, TPersistentObject> setter)
     where TAggregateRoot : IAggregateRoot
     where TPersistentObject : IPersistentObject
 {
     return(setter.AfterMapping((s, d) => d.AddDomainEvents(s.GetDomainEvents())));
 }
 /// <summary>
 /// Store aggregate domain Events to persistent object.
 /// </summary>
 /// <typeparam name="TEntity"><see cref="IEntity"/></typeparam>
 /// <typeparam name="TPersistentObject"><see cref="IPersistentObject"/></typeparam>
 public static TypeAdapterSetter <TEntity, TPersistentObject> MapDomainEvent <TEntity, TPersistentObject>(this TypeAdapterSetter <TEntity, TPersistentObject> setter)
     where TEntity : IEntity
     where TPersistentObject : IPersistentObject
 {
     return(setter.AfterMapping((s, d) => d.AddDomainEvents(s.GetDomainEvents())));
 }