MS SQL DB connction

I have created two databases in mssql server on docker. It is connecting through azure data studio but my dotnet API is not able to connect to it. Can somebody help me with this.