entity-framework - “Unable to find a table” 在数据库第一个脚手架-DbContext 上

标签 entity-framework asp.net-core-2.0 ef-core-2.0

出于某种原因,我收到此错误。以下是规范,然后是我所做的。

Visual Studio 2017 v15.6.2

SQL Server 2008 v10.50.4


我打开了包管理器控制台并添加了以下包...
Install-Package Microsoft.EntityFrameworkCore.SqlServer

Install-Package Microsoft.EntityFrameworkCore.Tools
然后我跑了
Scaffold-DbContext "Server=ph2srv76;Database=AVDRS;Integrated Security=True;Trusted_Connection=True;" -Provider Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -force
但是在构建过程中我收到以下错误...
enter image description here

最佳答案

我讨厌发布明显的信息,但在我的情况下(同样的错误),我将特定的表定位到模型(使用 -t 选项)并且没有意识到表名区分大小写。哦!

关于entity-framework - “Unable to find a table” 在数据库第一个脚手架-DbContext 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49369114/

相关文章:

c# - Entity Framework - 自动变更检测的优势是什么?

asp.net - 从命令行运行应用程序并启动浏览器

c# - 从.NET core中的IQueryable获取Sqlite SQL语句

entity-framework - 从对基类的请求中排除派生实体

c# - 验证 30000 没有为小数列指定类型

c# - 如何使用字符串参数从 dbcontext 中查找对象,而不是使用 Find(主键) 函数

asp.net-mvc - 您如何首先使用 EF 4.2 代码配置 mvc-mini-profiler

c# - 使用 Entity Framework Database.SqlQuery 进行 SQL 注入(inject)

c# - 不同角色的不同 API 功能

asp.net-core - 使用空路由指定可选格式扩展名