Linq context object isn't registering as a type of System.IDisposable object

前端 未结 7 1758
情歌与酒
情歌与酒 2021-02-19 00:37

I\'m trying to use my \'context\' object in a using statement. It works on one project, but on another, I\'m getting the following error.

\'...\': type u

相关标签:
7条回答
  • 2021-02-19 01:06

    This is an older question, but since I found it via a Google search:

    I've experienced this while working with a website that worked without issue in Visual Studio 2010.

    There's something odd about Visual Studio 2012 and Entity Framework; adding EF to an existing project causes EF 5.0 to be installed (NuGet package), with no option to stick with 4.0.

    A comment on this answer to a linked question is what made the realization pop.

    Solution seems to be upgrade to the EF version that VS 2012 uses, or use VS 2010.

    0 讨论(0)
提交回复
热议问题