File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/Persistence/Wolverine.Marten Expand file tree Collapse file tree 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
283283
284284 public StoreManyDocs ( IList < T > documents ) : this ( documents . ToArray ( ) ) { }
285285
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+
286300 public override void Execute ( IDocumentSession session )
287301 {
288302 session . Store ( _documents ) ;
@@ -295,6 +309,18 @@ public StoreObjects(params object[] documents) : base(documents) { }
295309
296310 public StoreObjects ( IList < object > documents ) : this ( documents . ToArray ( ) ) { }
297311
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+
298324 public override void Execute ( IDocumentSession session )
299325 {
300326 session . StoreObjects ( Documents ) ;
You can’t perform that action at this time.
0 commit comments