A connection was successfully established, but error occurred during the login process

165 views Asked by At

I am facing below error when I am run scaffold-dbcontext command.

My command:

Scaffold-DbContext "Server=DESKTOP-C2GIJPS\MSSQLSERVER2016;Database=EmployeeDB;Trusted_Connection=True;"  
         Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

Error:

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.)

I want to create a dbContext class using a database-first approach.


3 nuget packages are required to install before running the scaffold command:

  1. Microsoft.EntityFrameworkCore.SqlServer
  2. Microsoft.EntityFrameworkCore.Tools
  3. Microsoft.EntityFrameworkCore.Design
0

There are 0 answers