entity framework 哪些操作 查询数据库

2025-05-02 01:19:04
推荐回答(1个)
回答1:

通过datacontext直接‘.’一下
获得所有数据:
using (var db = new DBContext())
{
var employees = db.Employees.ToList();
......
}