https://github.com/publishername/hotelbooking_api
Hotel Room Booking Backend in C# .NET: Simplifying room reservations with a powerful and easy-to-use backend.
https://github.com/publishername/hotelbooking_api
Last synced: about 1 year ago
JSON representation
Hotel Room Booking Backend in C# .NET: Simplifying room reservations with a powerful and easy-to-use backend.
- Host: GitHub
- URL: https://github.com/publishername/hotelbooking_api
- Owner: PublisherName
- Created: 2024-01-21T18:31:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T09:59:25.000Z (over 2 years ago)
- Last Synced: 2025-02-06T07:46:23.780Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hotel Booking API Using C# and ASP.NET Core
This is a simple hotel booking API using C# and ASP.NET Core. It is a RESTful API that allows you to create, read, update and delete hotel bookings.
### Prerequisites
1. Install .NET SDK (8.0.101) and Runtime (8.0.1)
```sh
sudo pacman -S dotnet-sdk
sudo pacman -S dotnet-runtime
dotnet tool install --global dotnet-ef
```
## Getting Started
To get a local copy up and running follow these simple steps.
1. Clone the repository
```sh
git clone https://github.com/PublisherName/HotelBooking_API.git
```
2. cd into the project directory
```sh
cd HotelBookingAPI
```
3. Update the appsettings.json file with your database connection string. Dummy connection string is provided inside the appsettings.json.back file.
```sh
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "server=;database=;user=;password="
},
"SecretKey": ""
}
```
4. Install NuGet packages
```sh
dotnet restore
```
5. Build the project
```sh
dotnet build
```
6. Run the project
```sh
dotnet run
```
7. Open the project in your browser
```sh
https://localhost:5293/swagger/index.html
```
## Migration
1. Add migration
```sh
dotnet ef migrations add InitialCreate
```
2. Update database
```sh
dotnet ef database update
```