connection string for sqlserver in Docker container

后端 未结 5 1785
無奈伤痛
無奈伤痛 2020-12-29 18:55

I\'m using Visual Studio 2017 for mac with dotnet Core and EF Core. After setting up the mssql image in Docker container , I was trying to add the connection string but thr

5条回答
  •  爱一瞬间的悲伤
    2020-12-29 19:25

    Most likely your server name is localhost and port 1401 (which is the default for Docker container setup). Therefore, you'll need to use the following connection string:

    "Default": "Server=localhost,1401; Database=ERPDb; User=sa; Password =******;"
    

提交回复
热议问题