Skip to content

Commit

Permalink
DX alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-zahiri authored and jeremydmiller committed Dec 12, 2024
1 parent 314c668 commit 23cc2b6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Persistence/Wolverine.Marten/IMartenOp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,13 @@ public class StoreManyDocs<T> : DocumentsOp where T : notnull
{
private readonly T[] _documents;

public StoreManyDocs(IEnumerable<T> documents) : base(documents.Cast<object>())
public StoreManyDocs(params T[] documents) : base(documents.Cast<object>().ToArray())
{
_documents = documents.ToArray();
_documents = documents;
}

public StoreManyDocs(IList<T> documents) : this(documents.ToArray()) { }

public override void Execute(IDocumentSession session)
{
session.Store(_documents);
Expand Down Expand Up @@ -332,10 +334,10 @@ public abstract class DocumentsOp : IMartenOp
{
public object[] Documents { get; }

protected DocumentsOp(IEnumerable<object> documents)
protected DocumentsOp(params object[] documents)
{
Documents = documents.ToArray();
Documents = documents;
}

public abstract void Execute(IDocumentSession session);
}
}

0 comments on commit 23cc2b6

Please sign in to comment.