<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xin9le</author_name>
  <author_url>https://blog.hatena.ne.jp/xin9le/</author_url>
  <blog_title>xin9le.net</blog_title>
  <blog_url>https://xin9le.hatenablog.jp/</blog_url>
  <categories>
    <anon>Database</anon>
    <anon>.NET</anon>
    <anon>C#</anon>
  </categories>
  <description>C# / .NET + SQL Server 環境において Bulk Insert をするのはなかなかお手間です。それもこれも SqlBulkCopy という専用クラスがなかなか曲者なためなのですが。ただただ IEnumerable&lt;T&gt; のようなコレクションを挿入するのにひと工夫というか、ひと手間必要なのが心理的にハードルが高い。初見殺し！ 僕自身、過去にやっていたのは DataTable を利用した方法でした。以下の記事に良い例が載っているので詳細はそちらに譲りますが、DataTable のインスタンスを作るにあたって一度データのコピーが必要になる上に、要素数が多いと内部の動的配列の拡張が…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxin9le.hatenablog.jp%2Fentry%2F2022%2F10%2F05%2F012041&quot; title=&quot;SqlBulkCopy + IDataReader を利用した IEnumerable&amp;lt;T&amp;gt; の高効率なバルク挿入 - xin9le.net&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-10-05 01:20:41</published>
  <title>SqlBulkCopy + IDataReader を利用した IEnumerable&lt;T&gt; の高効率なバルク挿入</title>
  <type>rich</type>
  <url>https://xin9le.hatenablog.jp/entry/2022/10/05/012041</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
