我運行這個:
? dotnet ef dbcontext scaffold 'Server=localhost,1433;Database=Pub;User ID=sa;Password=Banana100;Trusted_Connection=true;TrustServerCertificate=true;' Microsoft.EntityFrameworkCore.SqlServer --output-dir Models
Build started...
Build succeeded.
To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
但是我的模型中沒有創建任何內容,我 什至沒有收到任何錯誤。我嘗試了另一個專案但無法正常作業。

我有我的金塊包。

并且 dotnet ef 作業正常。

我真的很感謝一些幫助,我真的很想在 linux 中使用 netcore。
uj5u.com熱心網友回復:
我現在可以將 linux 與 dotnet 一起使用。
洗掉Trusted_Connection=true; 成功了
所以這是正確的命令:
dotnet ef dbcontext scaffold 'Server=localhost,1433;Database=Pub;User ID=sa;Password=Banana100;TrustServerCertificate=true;' Microsoft.EntityFrameworkCore.SqlServer --output-dir Models
在模型中創建的啤酒和品牌,來自我的資料庫。

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/433484.html
標籤:。网 asp.net-mvc 实体框架 .net-core 实体框架核心
下一篇:過濾沒有正則運算式的字串匹配
