Error 50 during the initial DATABASE creation

I am writing an application for core 3.0, EF 6. Connection string: "DefaultConnection": "Server=(localdb)\\usersdb;Database=linkdb;Trusted_Connection=True;", in Startup, I pass the same line, there is no error in the line. I initialize the database through the context, through the Database.EnsureCreated() method. I didn't try to do it manually, but I wanted to achieve it using the CodeFirst principle.

Full text of the error:

Microsoft.Data.SqlClient.SqlException: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist.

Author: NeverGetBurn, 2019-12-10

1 answers

If anyone encountered it, the solution was to change the connection string, namely: usersdb to mssqllocaldb

 0
Author: NeverGetBurn, 2019-12-11 20:22:00