Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
https://metanit.com/sharp/adonet/2.2.php - read about the parameters and better throw off the error
How do you work with the database and what is the database in general, ms sql?
If you create tables through sql management studio, how do you connect to the database?
Try to connect to this server (localdb)\mssqllocaldb with Windows username and password. If suitable, then use it in the connection string
Connecting via DataSource was previously in the .net framework via the web config. I haven't looked into it too much, maybe they are the same. In .net core, connection strings are written in appsettings.json like this:
"ConnectionStrings": {
"AppConnection": "Server=(localdb)\\mssqllocaldb;Database=game;Trusted_Connection=True;MultipleActiveResultSets=true"
}
Here the screw login/password is used. If you created your own user, then instead of Trusted_Connection=True; type in User ID=root;Password=root;
An additional question, why do you need ado.net at all when there is an entity framework?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question