I am currently trying myself in Entity Framework in C# and trying to do the registration/auth with Identity. I was following this guide (3:38) but when came the migration part I've got some issues.
The person in the guide uses a PostgreSQL server on some hosting to connect to it with a connection string
Host=;Port=;Database=;Username=;Password;
and connects to his hosting. I don't have any hosting machine and never worked with servers. How can I use (if I actually can) a connection string to create a database file right in my project directory?
CodePudding user response:
use connetion string :
"ConnectionStrings": {
"LocalhostConnection": "Host=127.0.0.1;Password=********;Persist Security Info=True;Username=databaseUser;Database=DatabaseName",
"RemoteConnection": "Host=IP or Domain Address;Port=3432;Password=********;Persist Security Info=True;Username=databaseUser;Database=DatabaseName"
},
CodePudding user response:
mean of the host here (in the test environment) is the database (postgreSQL) installed on your computer. As foad abdollahi said, the host address can be IP address or Domain name or etc. so first you must find your PostgreSQL info installed PC. for retrive this info can use this link:PostgreSQL database service