score:2

Accepted answer
var dt = new datatable();
dt.columns.add("lastname", typeof(string));
dt.columns.add("firstname", typeof(string));
dt.columns.add("midname", typeof(string));

while (streamreader.peek() > 0)
{
    string[] currentrowvalues = streamreader.readline().split(delimiter);
    string lastname = currentrowvalues[columnheadertolocationy["lname"]];
    string firstname = currentrowvalues[columnheadertolocationy["fname"]];
    string middlename = currentrowvalues[columnheadertolocationy["mname"]];
    dt.rows.add(lastname, firstname, middlename);
}

var data = new sqlparameter("data", sqldbtype.structured);
data.typename = "dbo.udt_providerimport";
data.value= dt;

// use this if you're inserting directly from the stored procedure:
context.database.executesqlcommand("exec dbo.usp_importproviderifeligible @data", data);

// if you're returning the new records for further processing,
// create a type to hold the returned values, and use:
// var results = context.database.sqlquery<resulttype>("exec dbo.usp_importproviderifeligible @data", data);

score:1

var textlist = new list<textentry>();

//load all the entries from the text file

var providersindb = context.providers.where(p => textlist.any(t => p.firstname == t.firstname && p.lastname == t.lastname && p.midname == t.middle));

var textentriesnotindb = textlist.where(t => !providersindb.any(p => p.firstname == t.firstname && p.lastname == t.lastname && p.midname == t.middle));
//add those text entries

Related Query