I would like to select just specific fields in the db and create a list. I want the select statement to return all the records that have the InvoiceNumber of 1020.
and the only records in the field i want are fName, lName, and Email. This bind it to a dategrid.
How would I write this with entity.
MyEntities1 m = new MyEMEntities1();
int v = 1020;
GridView1.DataSource = m.Invoice.fName,lName,Email(x => x.InvoiceNumber == v).ToList();