The type or namespace name 'Entity' does not exist in the namespace 'System.Data'

后端 未结 21 1501
余生分开走
余生分开走 2020-12-08 12:46

I\'m using WS class and it gave me error when I run the application:

The type or namespace name \'Entity\' does not exist in the namespace \'System.Data\' 
<         


        
相关标签:
21条回答
  • 2020-12-08 13:30

    I just had the same error with Visual Studio 2013 and EF6. I had to use a NewGet packed Entity Framework and done the job perfectly

    0 讨论(0)
  • 2020-12-08 13:32

    tried reinstall - no luck. i had to refresh a table in my model before it would find Entity.

    0 讨论(0)
  • 2020-12-08 13:33

    I had the same errors.

    I added System.Data.Entity.Repository from Nuget Packages and the errors disappears.

    Hope it wil help!

    0 讨论(0)
  • 2020-12-08 13:35

    I will add my answer to cover all cases:

    My solution was unistalling EntityFramework from NuGet Package Manager and then I was prompted to restart Visual Studio because it couldn't "finalize the uninstall".

    I restarted Visual Studio and reinstalled EntityFramework then my problem was solved.

    Hope this helps someone!

    0 讨论(0)
  • 2020-12-08 13:35

    It's helped me, I uninstalled EF, restarted VS and I added 'using':

    using System.Data.Entity;
    using System.Data.Entity.Core.Objects;
    using System.Data.Entity.Infrastructure;
    
    0 讨论(0)
  • 2020-12-08 13:36

    Thanks every body! I found the solution. not that I understand why but I tried this and it worked! I just had to add a reference to: System.Data.Entity.Design and don't have to write any using in the code. Thanks!

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