I used below connectionstring format for WebApi, it didnot work.
"ConnectionStrings": {
"DefaultConnection": "Data Source = William\SQL2017Express; Initial Catalog=ContactMgmtDB;Integrated Security=SSPI;"
},
here the info, How to write a connection string for Database that has "\" for this format Servername\Instanced Name
1)Authentication Method : Windows Authentication
2) Server Name : William\SQL2017EXPRESS
3) Instance Name: SQL2017EXPRESS
Update: This string contain "\\"
for escape character. Is this OK
"DefaultConnection": "Data Source = William"\\"
SQL2017Express; Initial Catalog=ContactMgmtDB;Integrated Security=SSPI;"
Thanks