I have 1M html files that I need to parse and then insert the extracted information into my sql server. Each file parsed out information end up in multiple tables due to relationships among the objects I have parsed out
I am using Entity Framework right now to do this but adding each piece of my information to the proper object on the EF context takes a long time and not efficient! I need this faster especially that I have so many file to process.
What is the fasted way to parse out a lot of file in parallel and insert it in SQL server where items you are adding have relationships?
Also, is there a better technology for this? Like Informatica?
I think SqlBulkCopy Class will be the best option in this case.
You can make a generic wrapper around
SqlBulkCopyclass, which will allow you to useSqlBulkCopyon any entity. Below is the wrapper for LINQ-to-SQL, but the same idea will work with Entity Framework, with the assumption that your entity mapped to tables one-to-one.