I am trying to have my asp.net WebAPI web service read a `.csv` and update a database using Entity Framework. The `.csv` file is about 20,000-30,000 rows.

As of now I am using a `TextfieldParser` to read the `.csv`, each row of the `.csv` file I create a new object, then add object to the EF context.

Once it's done adding all rows to the context, then I call `db.SaveChanges();`

Watching the console I noticed it calls an update statement for each row... which takes a long time. Is there a better more efficient way to accomplish this?

```
if (filetype == "xxx")
{
    using (TextFieldParser csvReader = new TextFieldParser(downloadFolder + fileName))
    {
        csvReader.SetDelimiters(new string[] { "," });
        csvReader.HasFieldsEnclosedInQuotes = true;

        int rowCount = 1;

        while (!csvReader.EndOfData)
        {
            string[] fieldData = csvReader.ReadFields();

            //skip header row
            if (rowCount != 1)
            {                           
                var t = new GMI_adatpos
                        {
                            PACCT = fieldData[3]
                        };

                db.GMI_adatpos.Add(t);
            }

            rowCount++;
        }
    }
}

db.SaveChanges();

```