efcore 8A connection was successfully established with the server, but then an error occurred during

一、EF Core8  数据库连接字符串报错

A connection was successfully established with the server, but then an error occurred during

解决方案:

连接字符串增加标识

TrustServerCertificate=True

或者加(Encrypt=True;TrustServerCertificate=True;)即可:

"ConnectionStrings": {

"DefaultConnection": "Data Source=LAPTOP;Initial Catalog=DB;persist security info=True;User ID=sa;Pwd=XXXXX;Encrypt=True;TrustServerCertificate=True;"

},

字符串格式2:

 "SqlServer": "data source=xxx;initial catalog=QL.Back.Template6;uid=xxx;pwd=xxxx;TrustServerCertificate=True;"

更多:

EF Core8 Only the invariant culture is supported in globalization-invariant mode

EfCore 表关系一对一,使用案例

EF 框架的简介、发展历史;ORM框架概念

你可能感兴趣的:(EntiryFramework,efcore,8)