DbSet doesn't have a Find method in EF7

后端 未结 11 1777
醉话见心
醉话见心 2020-12-03 04:28

I am trying to create a generic repository to access my database. In EF6 I was able to do that in order to get a specific entity:

protected IDbSet d         


        
11条回答
  •  误落风尘
    2020-12-03 04:46

    Can't comment because of reputation, but if you use RC2 (or later?) you should use

    var context = set.GetService().Context;
    

    instead of

    var context = set.GetService();
    

提交回复
热议问题