views:

135

answers:

1

I'm working on a small console utility to upload batches of data to our hosted SQL server. The total data size can get up to several megabytes. I'd like a way to display the progress of the SaveChanges operation. Is there any way I can do this with the Entity Framework? If not, any recommendations would be appreciated.

+2  A: 

First, I'm presuming that when you say "batches of data" you mean multiple records, rather than one record with a very large blob on it. There's probably nothing you can do in the latter case. But in the former case...

If it takes long enough that you even care, I would seriously consider stepping outside of the Entity Framework, and using one of the (many) SQL Server bulk insert facilities, as it will considerably speed up the insert, which will probably make your users happier than a progress bar would.

Craig Stuntz
Your assumption is correct. So something like SqlBulkCopy, then?
Cogwheel - Matthew Orlando
Something like that, yes. There are several choices.
Craig Stuntz