Is ObjectContext deprecated in .NET 4.5?

后端 未结 3 2087
北海茫月
北海茫月 2021-02-05 14:36

I\'ve been using ObjectContexts for quite a long time now. Now that I\'ve installed VS 2012, for my surprise the Entity Data Model does not have an option for a Cod

3条回答
  •  佛祖请我去吃肉
    2021-02-05 15:06

    I'm not sure how to make an EDMX generate using ObjectContext, but no it is not deprecated. DbContext is used because for 99% of users, the functionality of ObjectContext is not needed.

    You can get a reference to an ObjectContext from a DbContext, though: ((IObjectContextAdapter)dbContext).ObjectContext

提交回复
热议问题