更新时间:2022-11-05 09:17:32
DbContext
只是围绕 ObjectContext
DbContext
只是一组比 ObjectContext
所暴露的API更易于使用的方法这里有一个非常简单的VS模板,它使用Repository Pattern和EF
I've DbContext class from there I have an implementation of Generic Repositories and unit of work in a such way that leads to use ObjectContext. I followed this link in general.
I've read lot of posts related to the ObjectContext vs DBContext which somewhat makes sense. But I've no idea about my current implementation. just wondering if its an anti-pattern or I'm playing safe?
DbContext
is just a wrapper around ObjectContext
DbContext
is just a set of APIs that are easier to use than the APIs exposed by ObjectContext
Anyway here there is a very simple VS Template that uses Repository Pattern and EF