File tree 1 file changed +26
-0
lines changed
src/Persistence/Wolverine.Marten
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,20 @@ public StoreManyDocs(params T[] documents) : base(documents.Cast<object>().ToArr
283
283
284
284
public StoreManyDocs ( IList < T > documents ) : this ( documents . ToArray ( ) ) { }
285
285
286
+ public StoreManyDocs < T > With ( T [ ] documents )
287
+ {
288
+ Documents . AddRange ( documents . Cast < object > ( ) ) ;
289
+ _documents . AddRange ( documents ) ;
290
+ return this ;
291
+ }
292
+
293
+ public StoreManyDocs < T > With ( T document )
294
+ {
295
+ Documents . Append ( document ) ;
296
+ _documents . Append ( document ) ;
297
+ return this ;
298
+ }
299
+
286
300
public override void Execute ( IDocumentSession session )
287
301
{
288
302
session . Store ( _documents ) ;
@@ -295,6 +309,18 @@ public StoreObjects(params object[] documents) : base(documents) { }
295
309
296
310
public StoreObjects ( IList < object > documents ) : this ( documents . ToArray ( ) ) { }
297
311
312
+ public StoreObjects With ( object [ ] documents )
313
+ {
314
+ Documents . AddRange ( documents ) ;
315
+ return this ;
316
+ }
317
+
318
+ public StoreObjects With ( object document )
319
+ {
320
+ Documents . Append ( document ) ;
321
+ return this ;
322
+ }
323
+
298
324
public override void Execute ( IDocumentSession session )
299
325
{
300
326
session . StoreObjects ( Documents ) ;
You can’t perform that action at this time.
0 commit comments