void IRegisterChildEntities.RegisterChildEventProvider(IEntityEventProvider entityEventProvider) { entityEventProvider.HookUpVersionProvider(GetNewEventVersion); _childEventProviders.Add(entityEventProvider); }
public static bool TryGetValueById <TEventProvider, TDomainEvent>(this IEnumerable <TEventProvider> list, Guid Id, out IEntityEventProvider <TDomainEvent> baseEntity) where TEventProvider : IEntityEventProvider <TDomainEvent> where TDomainEvent : IDomainEvent { baseEntity = list.Where(x => x.Id == Id).FirstOrDefault(); return(baseEntity != null); }