title: Is there any way to get a full total record count from SqlBulkCopy?
body: <p><a href="https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlbulkcopy?view=dotnet-plat-ext-5.0" rel="nofollow noreferrer">The <code>SqlBulkCopy</code> class</a> has a reporting mechanism built in: the <code>SqlRowsCopied</code> event.  Every <code>NotifyAfter</code> records, it fires this event and gives you a running total of how many rows have been copied so far.</p>
  <p>This is great, as long as your total number of rows is an exact multiple of the <code>NotifyAfter</code> property.  But if it's not, you get an inaccurate count.  In the worst case scenario, where your total number of rows is <em>less than</em> the <code>NotifyAfter</code> property, your total gets reported as 0!</p>
  <p>Is there any way to get an accurate count out of this class, without having to either resort to a separate query as <a href="https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlbulkcopy.sqlrowscopied?view=dotnet-plat-ext-5.0" rel="nofollow noreferrer">the doc page does</a> or set <code>NotifyAfter</code> to 1 and slow the copying to a crawl?</p>