My code works great, as long as there aren't any commas in the data.
IEnumerable<Account> AccountItems = from line in File.ReadAllLines(filePath).Skip(1)
let columns = line.Split(',')
select new Account
{
AccountName = columns[0],
BKAccountID = columns[1],
Brand = columns[2],
FirstOE = columns[3],
LastOE = columns[4]
};
But the output includes data with commas, and wraps the data in double quotes when there is a comma in the data. I'm not sure if I can still use LINQ to do this.
Acme Health Care,{C2F9A7DD-0000-0000-0000-8B06859016AD},"Data With, LLC",2/4/2013,2/18/2013