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:
- Microsoft.EntityFrameworkCore.SqlServer
- Microsoft.EntityFrameworkCore.Tools
- Microsoft.EntityFrameworkCore.Design