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.
可能重复: ObjectContext vs DbContext
实体框架中的 DBContext 和 Object 上下文有什么区别?它们仅在属性上有所不同还是有任何其他显着差异?
EF v4.0 的 ObjectContext 以及使用设计器生成的模型和 DbContext 用于 EF v4.1 代码优先模型时。
尽管它们几乎相同,但 DbContext 需要更少的代码来实现相同的功能。