Interview challenge project to build CRUD app for hospitals.
- Ensure the server for the database to be used has SQL Server logins enabled.
- Change the connection string in
HospitalManagement.Mvc
>appsettings.json
to point to a database of your choice.- If the database is not of type Microsoft SQL Server, you will want to change the extension method in
HospitalManagement.Config.HospitalContext
fromUseSqlServer()
to your database engine of choice.
- If the database is not of type Microsoft SQL Server, you will want to change the extension method in
- At the root of the
Mvc
project, run the below command in your command prompt:
dotnet user-secrets set "Database__Password" "<your password goes here>"
- Update the password set in
HospitalManagement.Database
>Security
>HospitalManagementUser.sql
to match the password you entered above. - Publish the
Database
project to your database. - It is recommended to now delete the aforementioned
HospitalManagementUser.sql
file to avoid committing your database user's password into source control. - Run the below command at the root of the
Mvc
project:
npm install
- Execute the
SampleData.sql
script in theDatabase
project to insert some sample data into the application's database.