Skip to content

Instantly share code, notes, and snippets.

@DmitrySikorsky
Created November 20, 2018 10:38
Show Gist options
  • Save DmitrySikorsky/e9e92e9c98fb49119e2e141afe683516 to your computer and use it in GitHub Desktop.
Save DmitrySikorsky/e9e92e9c98fb49119e2e141afe683516 to your computer and use it in GitHub Desktop.
public void Merge(int parentItemId, IEnumerable<ChildItem> childItems)
{
using (IDbConnection db = this.CreateDbConnection())
db.Execute(
"UpdateChildItems",
new { ParentItemId = parentItemId, ChildItems = childItems.ToDataTable("ParentItem") },
commandType: CommandType.StoredProcedure
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment