@@ -66,12 +66,13 @@ public static async Task<ISnapshotRepository<TEntity>> CreateSnapshotRepository<
6666 /// </summary>
6767 /// <typeparam name="TEntity">The type of the entity.</typeparam>
6868 /// <param name="serviceProvider">The service provider.</param>
69+ /// <param name="entityId">The id of the entity.</param>
6970 /// <returns>A new instance of <typeparamref name="TEntity"/>.</returns>
70- public static TEntity Construct < TEntity > ( this IServiceProvider serviceProvider )
71+ public static TEntity Construct < TEntity > ( this IServiceProvider serviceProvider , Guid entityId )
7172 {
7273 var constructingStrategy = serviceProvider . GetRequiredService < IConstructingStrategy < TEntity > > ( ) ;
7374
74- return constructingStrategy . Construct ( ) ;
75+ return constructingStrategy . Construct ( entityId ) ;
7576 }
7677
7778 /// <summary>
@@ -107,16 +108,15 @@ public static IFact<TEntity> GetVersionNumberFact<TEntity>(this IServiceProvider
107108 /// </summary>
108109 /// <typeparam name="TEntity">The type of the entity.</typeparam>
109110 /// <param name="serviceProvider">The service provider.</param>
110- /// <param name="entityId">The id of the entity.</param>
111111 /// <param name="entity">The entity.</param>
112112 /// <returns>The tags for <paramref name="entity"/>.</returns>
113- public static ITag [ ] GetTags < TEntity > ( this IServiceProvider serviceProvider , Guid entityId , TEntity entity )
113+ public static ITag [ ] GetTags < TEntity > ( this IServiceProvider serviceProvider , TEntity entity )
114114 {
115115 var taggingStrategy = serviceProvider . GetService < ITaggingStrategy < TEntity > > ( ) ;
116116
117117 if ( taggingStrategy != null )
118118 {
119- return taggingStrategy . GetTags ( entityId , entity ) ;
119+ return taggingStrategy . GetTags ( entity ) ;
120120 }
121121
122122 return Array . Empty < ITag > ( ) ;
@@ -181,7 +181,7 @@ public static async Task<TEntity> GetEntity<TEntity>(this IServiceProvider servi
181181 snapshot = await snapshotRepository . GetSnapshot ( entityId ) ;
182182 }
183183
184- var entity = snapshot ?? serviceProvider . Construct < TEntity > ( ) ;
184+ var entity = snapshot ?? serviceProvider . Construct < TEntity > ( entityId ) ;
185185
186186 var versionNumber = serviceProvider . GetVersionNumber ( entity ) ;
187187
0 commit comments