Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes #2054: Support Insert multiple rows from IEnumerable#2086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jzabroski merged 1 commit intofluentmigrator:mainfromjayharris:issue-2054
Aug 17, 2025

Conversation

@jayharris
Copy link
Contributor

@jayharrisjayharris commentedJun 19, 2025
edited
Loading

ForInsert.IntoTable, adds a newRows method that allows inserting multiple records from a single method call, such as from an instance ofIEnumerable<object>. The implementation is done withparams for convenient use. TwoRows method were added: for anonymous types and forIDictionary<string, object>, matching the implementation of the existingRow methods.

Rather than using:

foreach(varrecordinrecords){Insert.IntoTable("myTable").Row(record);}

The code can be simplified to:

Insert.IntoTable("myTable").Rows(records);

Because ofparams, this also allows developers that are making individual record calls:

Insert.IntoTable("myTable").Row(new{Data1="Row1Data1",Data2="Row1Data2"}).Row(new{Data1="Row2Data1",Data2="Row2Data2"});

to instead use a singleRows call:

Insert.IntoTable("myTable").Rows(new{Data1="Row1Data1",Data2="Row1Data2"},new{Data1="Row2Data1",Data2="Row2Data2"});

This completes#2054.

Notes:
Regarding thedata method argument on theRow method: becausedata is ambiguous regarding singular and plural use, the argument has been renamed torecord/records.

Fixes#2054

@jzabroskijzabroski added this to the7.2.0 milestoneJun 24, 2025
@jzabroskijzabroski merged commita5c5195 intofluentmigrator:mainAug 17, 2025
1 check passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

7.2.0

Development

Successfully merging this pull request may close these issues.

Support to add multiple rows from an IEnumerable<object>?

2 participants

@jayharris@jzabroski

[8]ページ先頭

©2009-2025 Movatter.jp