Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 LINQ 获取表中所有行的最佳方法是什么?
前期我已经生成了一个 *.dbml 文件并创建了一个 dbContext。
只需在上下文类中引用生成的可枚举集合即可:
var allRecords = context.SomeTable;
可能
FooDB fooBD = new FooDB(); var foo = fooBD.EntityFoo.ToList();