Entity Framework is an ORM layer for .NET applications. Sometimes, we import data from a flat file. Technically, this boils down to: Delete all records from the table. And insert new records into the table.
Import data
Below is the first cut of code that I wrote. A logical use of Entity framework. But unexpectedly, yields very poor performance.
// delete data foreach(Employee emp in context.Employees)…