John
John

Reputation: 3945

obtain all records in table with entity framework

using entity framework how do I obtain all the records in a table?

using (Entities db = new Entities())
{
 IEnumerable<UploadedFile> allSalesUploaded = new List<UploadedFile>();

so instead of = new List, I am looking for all the records in the UploadedFile table? db.?context?

Upvotes: 0

Views: 9338

Answers (1)

Kaf
Kaf

Reputation: 33809

Use this:

var allSalesUploaded = db.UploadedFile.ToList();

Upvotes: 8

Related Questions