Closed dineshthigale closed 5 years ago
If you have LocalDB installed (with Visual Studio), a LocalDB database will be created by applying the migration on Run. See Program.cs -> databaseInitializer.SeedAsync().Wait(); Initial migration is provided in the sources. If you want to use another type db, you'll have to regenerate the migrations file after you change the DefaultConnection string in appsettings.json
Here are the steps I took to use full SQL Server database:
For Ms SQL type databases (SQL Express, SQL Server, LocalDB, ...) what you have to do is make sure the connection string points to the database of your choice and the credentials used has the rights to create databases and tables on the target server. You then run your application and everything will be created for you automatically using migrations. Other database types might involve some modifications based on the specifics of that db type.
how create the database for this quick app?