使用 EntityFramework 的构建项目失败并出现很多错误

Sal*_*mar 0 c# ado.net entity-framework visual-studio entity-framework-6

我在 Visual Studio C# 项目中使用 EntityFramework 作为我的数据访问层。我添加了一个新的实体模型并立即构建,没有添加或做任何事情来测试其功能。不幸的是,构建失败并出现许多错误,例如:

CS0426  The type name 'Data' does not exist in the type 'System'
CS0138  A 'using namespace' directive can only be applied to namespaces; 'System' is a type not a namespace. Consider a 'using static' directive instead    
CS0246  The type or namespace name 'Nullable<>' could not be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)

代码编辑器本身看起来好像缺少某些东西,即使一切都已就位

在此处输入图片说明 在此处输入图片说明

图片显示了我的项目中的编辑器和参考文献

PS:项目类型为Class Library

Sal*_*mar 5

显然,这都是我的错。我在数据库中有一个名为“Systems”的表,当Entity Framework将复数变为单数时,它变成了“System”类,这给编译器造成了混乱和歧义。因此,编译器无法正确解析类型。