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. 开发者_如何学CIs there any way I can do this with the Entity Framework? If not, any recommendations would be appreciated.
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.
精彩评论