diff --git a/src/Persistence/Wolverine.Marten/IMartenOp.cs b/src/Persistence/Wolverine.Marten/IMartenOp.cs index c88eaa5f..8f73b5b1 100644 --- a/src/Persistence/Wolverine.Marten/IMartenOp.cs +++ b/src/Persistence/Wolverine.Marten/IMartenOp.cs @@ -260,9 +260,9 @@ public class StoreManyDocs : DocumentsOp where T : notnull { private readonly T[] _documents; - public StoreManyDocs(T[] documents) : base(documents) + public StoreManyDocs(IEnumerable documents) : base(documents.Cast()) { - _documents = documents; + _documents = documents.ToArray(); } public override void Execute(IDocumentSession session) @@ -332,9 +332,9 @@ public abstract class DocumentsOp : IMartenOp { public object[] Documents { get; } - protected DocumentsOp(params object[] documents) + protected DocumentsOp(IEnumerable documents) { - Documents = documents; + Documents = documents.ToArray(); } public abstract void Execute(IDocumentSession session);