I originally got help with getting a distinct list from a larger list with multiple nodes to group. I think that worked.
I now need help on how to use that list.
Here is my code:
var LOE = results.Body
.getEntitiesResponse
.getEntities
.listOfEntities
.Select(x=>new string[]{x.entityIdentification.DUNS,x.entityIdentification.DUNSPlus4})
.Distinct();
foreach (var d in LOE)
{
using (OleDbConnection conn = new OleDbConnection(cm.ConnectionString))
{
using (OleDbCommand cmd = new OleDbCommand())
{
cmd.CommandText = "sam.DeleteRecordsToBeUpdated";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@a", d.DUNS); //This is my problem area
cmd.Parameters.AddWithValue("@b", d.DUNSPlus4); //This is my problem area
cmd.Connection = conn;
conn.Open();
cmd.ExecuteNonQuery();
}
}
}
Can someone help me with how to use the new object created in the first line?
Maybe I am not setting the first line properly? I can't seem to use the object as I am trying to.