gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 12:01:12 26 4
gpt4 key购买 nike

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

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com