Class EfCoreTracedAggregateEntityExtensions
- Namespace
- Savvyio.Extensions.EFCore.Domain.EventSourcing
- Assembly
- Savvyio.Extensions.EFCore.Domain.EventSourcing.dll
Extension methods for the EfCoreTracedAggregateEntity<TEntity, TKey> class.
public static class EfCoreTracedAggregateEntityExtensions
- Inheritance
-
EfCoreTracedAggregateEntityExtensions
Methods
ToTracedDomainEvent<TEntity, TKey>(EfCoreTracedAggregateEntity<TEntity, TKey>, Type, IMarshaller)
Converts the specified entity into an implementation of ITracedDomainEvent interface equivalent to tracedDomainEventType.
public static ITracedDomainEvent ToTracedDomainEvent<TEntity, TKey>(this EfCoreTracedAggregateEntity<TEntity, TKey> entity, Type tracedDomainEventType, IMarshaller marshaller) where TEntity : class, ITracedAggregateRoot<TKey>
Parameters
entityEfCoreTracedAggregateEntity<TEntity, TKey>The entity to convert.
tracedDomainEventTypeTypeThe originating type of ITracedDomainEvent.
marshallerIMarshallerThe IMarshaller that is used when converting the specified
tracedDomainEventTypeinto a deserialized version of ITracedDomainEvent.
Returns
- ITracedDomainEvent
A new instance of an ITracedDomainEvent implementation.
Type Parameters
TEntityThe type of the entity that implements the ITracedAggregateRoot<TKey> interface.
TKeyThe type of the key that uniquely identifies the entity.