[英]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? 因此,我正在查找UploadedFile表中的所有记录,而不是= new List? db.?context? db。?上下文?
用这个:
var allSalesUploaded = db.UploadedFile.ToList();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.