我是Mac的新手,使用Docker镜像成功运行了Azure Sql Edge。 这是我运行该镜像的命令。
docker run -d --name SQLServerImg -e ACCEPT_EULA=Y -e SA_PASSWORD=StrongPassword@123 -p 1433:1433 mcr.microsoft.com/azure-sql-edge
这是我appsettings.json中的连接字符串。
"ConnectionStrings": {
"EmployeesManagementDB" : "Server=127.0.0.1,1433;Database=EmployeesManagementDB;MultipleActiveResultSets=true;User Id=sa;Password=StrongPassword@123"
}
这是我的Progoram.cs文件
builder.Services.AddControllers();
var connectionString = builder.Configuration.GetConnectionString("EmployeesManagementDB");
builder.Services.AddDbContext<EmployeeContext>(options => options.UseSqlServer(connectionString));
当我运行 dotnet ef database update 命令时,一直出现以下错误。
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
我该如何解决这个问题?我有什么遗漏的吗?
谢谢。