Microsoft Visual Studio 2022Asp.net core mvc DataBase first
用Scaffold-DbContext生成二維碼model時出現未知錯誤:
Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.
改字符串數組串接連:
jia(encrypt=true;trustservercertificate=true;)jike:
Scaffold-DbContext "Data Source=DBServer;Initial Catalog=DB1;User ID=sa;Password=1234;Encrypt=True;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models