Answer the question
In order to leave comments, you need to log in
Problem with Entity Framework. Can't get data from database. What to do?
I created a database, filled it with test data, but I can't work with them.
When the application tries to load data from the database, I get an exception:
"Microsoft.Data.SqlClient.SqlException: "Cannot open database "Database.db" requested by the login. The login failed.
Login failed for user 'DESKTOP\User'."
Before connecting from the application, made database migrations (add-Migration; update-Database)
Connection string: "Data Source=(localdb)\\mssqllocaldb;Initial Catalog=Database.db;Integrated Security =SSPI"
Answer the question
In order to leave comments, you need to log in
Install via Nuget SqlServer. Remove .db after Database. Should help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question