连接字符串错误 "Missing its statement block"
Connection String Error "Missing its statement block"
我在 Visual Studio 中使用更新后的 Nuget 包管理器控制台从我从名为 Sail 连接的数据库构建模型。当我将连接字符串输入包管理器控制台时。
PM> Data Source=localhost;Initial Catalog=Sail;Integrated Security=True
我收到以下错误:
At line:1 char:12
+ Data Source=localhost;Initial Catalog=Sail;Integrated Security=True; ...
The Data section is missing its statement block.
发现我的 answer:The 下面的块成功地从连接的 "Sail" SQL 数据库生成模型。
Scaffold-DbContext –Connection "Server(localdb)\mssqllocaldb;Database=Sail;Trusted_Connection=True;"
(localdb)\mssqllocaldb;Database=Sail;Trusted_Connection=True;"
-Provider "Microsoft.EntityFrameworkCore.SqlServer" -OutputDir "Models" –Context "Sail" –Verbose -Force
我在 Visual Studio 中使用更新后的 Nuget 包管理器控制台从我从名为 Sail 连接的数据库构建模型。当我将连接字符串输入包管理器控制台时。
PM> Data Source=localhost;Initial Catalog=Sail;Integrated Security=True
我收到以下错误:
At line:1 char:12
+ Data Source=localhost;Initial Catalog=Sail;Integrated Security=True; ...
The Data section is missing its statement block.
发现我的 answer:The 下面的块成功地从连接的 "Sail" SQL 数据库生成模型。
Scaffold-DbContext –Connection "Server(localdb)\mssqllocaldb;Database=Sail;Trusted_Connection=True;"
(localdb)\mssqllocaldb;Database=Sail;Trusted_Connection=True;"
-Provider "Microsoft.EntityFrameworkCore.SqlServer" -OutputDir "Models" –Context "Sail" –Verbose -Force