A localization-supported ASP.NET Core website that provides an easy way for websites to update statistics concerning bed capacity.
- ASP.NET Core 5 - Razor Pages
- Microsoft Entity Framework Core 5
- Microsoft SQL Server
-
To get started, create an
appsettings.json
in the root of theHospitalBedSystem
directory. Refer to the Entity Framework Core Documentation to set the connection string. Note: Use DefaultConnection as the database alias. -
Open the Nuget Package Manager Console in Visual Studio by going to Tools -> NuGet -> Package Manager Console
-
Select the Data project in the dropdown at the top of the package manager console.
-
Create the latest EF Core migrations:
Add-Migration "Initial Migration"
-
Update your database with the migration:
Update-Database
To learn more about Entity Framework Core and migrations, refer to the Official Migrations Overview or, to learn from scratch, the Official Getting Started Guide.
Respective tables should be created in your database.
The resource files are located in the HospitalBedTracker
project under the Resources
directory. The CommonResources.[language].resx
files are strings not specific to a certain page, and can be found grouped under the CommonResource.cs
in Visual Studio. The page-specific string resources can be found under the Pages
directory.
-
Add a new
CultureInfo
to the public static array inConfiguration.cs
in theGlobals
project. -
Duplicate a
CommonResources
reference resource file of your choice, renaming it toCommonResources.[2-letter language ISO code].resx
under theResources
directory in theHospitalBedTracker
project. -
For every page under the
Resources/Pages
directory, duplicate its respective resource file. Be sure to follow the format the already-existing resource files comply with.Note 1: For both steps 2 and 3, once you add a resource file, open it in Visual Studio and change the Access Modifier to Public. The dropdown is at the top ribbon.
Note 2: Both steps 2 and 3 will probably give you resource file-related errors in the Error List. Restarting Visual Studio should fix this, but you should be able to compile nonetheless.
-
Add your translations!
- Restrict the Register page to an administrator account.
- Make the login page redirect to the Hospital Manager page after logging in.
- Give hospitals an ability to update their thumbnail, Google Maps URL, and hospital name.