# TopskyHotelManagementSystem-WebApi
**Repository Path**: java-and-net/topsky-hotel-management-system-web-api
## Basic Information
- **Project Name**: TopskyHotelManagementSystem-WebApi
- **Description**: 基于.Net8搭配SQLSugar框架构建的TS酒店管理系统后端API项目,主要服务于WinForm Client和Vue3 Web端,欢迎Start&Fork
- **Primary Language**: C#
- **License**: MIT
- **Default Branch**: master
- **Homepage**: https://www.oscode.top
- **GVP Project**: No
## Statistics
- **Stars**: 21
- **Forks**: 16
- **Created**: 2021-07-28
- **Last Updated**: 2025-09-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Csharp, API, Web, Net8, Docker
## README

TopskyHotelManagementSystem-WebApi
### :pray: Thanks to the following open source projects:
1. ##### Autofac——An addictive .NET IoC container. [Autofac, MIT License](https://github.com/autofac/Autofac)
2. ##### SqlSugar——.Net aot ORM Fastest ORM Simple Easy Sqlite orm Oracle ORM Mysql Orm postgresql ORm SqlServer oRm 达梦 ORM 人大金仓 ORM 神通ORM C# ORM , C# ORM .NET ORM NET5 ORM .NET6 ORM ClickHouse orm QuestDb ,TDengine ORM,OceanBase orm,GaussDB orm ,Tidb orm Object/Relational Mapping. [SQLSugar, MIT License](https://github.com/DotNetNext/SqlSugar)
3. ##### Mailkit——A cross-platform .NET library for IMAP, POP3, and SMTP。[Mailkit,MIT License](https://github.com/jstedfast/MailKit)
4. ##### Swashbuckle.AspNetCore——Swagger tools for documenting API's built on ASP.NET Core。[SwaggerUI,MIT License](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)
5. ##### Newtonsoft.Json——Json.NET is a popular high-performance JSON framework for .NET。[Newtonsoft.Json,MIT License](https://github.com/JamesNK/Newtonsoft.Json)
### :exclamation: About this project:
This project is a TS hotel management system backend API project built on .Net8, mainly for the 2.0 upgrade, welcome to Star & Fork.
1. All development should comply with the MIT open source license.
2. If you find bugs, feel free to raise an issue!
3. The project currently supports multiple databases and automated database/table creation. For implementation details, refer to the `InitializeDatabase` method in `Startup.cs`.
4. This project has implemented multi-database support (mainstream) based on the SQL Sugar framework. Below is the list of currently tested and verified database compatibility tables:
| Database | Version | Support Create Table(Y/N) | Pass(Y/N) |
| ---------- | ---------------- | -------------------------- | ------------------------------------------------------------ |
| MariaDB | 10.11.10-MariaDB | Y | Y |
| PostgreSQL | 130020 | Y | Y |
| MySQL | 5.7+ | Y | Y |
| SQL Server | 2022 | Y | Y |
| Oracle | Unknown | N | Reference SQLSugar Document([SQLSugar](https://www.donet5.com)) |
| SQLite | Unknown | N | N |
### :thought_balloon: Development purpose:
Mainly for upgrading the existing C/S project hotel management system to version 2.0 to achieve a WebAPI interface that separates the front end from the back end. This project does not include any UI interface.
### :mag_right: System development environment:
Operating System: Windows 11(x64)
Development Tool: Microsoft Visual Studio 2022 (latest version of the system)
Database: MariaDB/PostgreSQL/MySQL/SQL Server
Database Management Tool: DbGate
Programming Language: C# language, LINQ language
Development Platform: .Net
Development Framework: .Net 8
Development Technology: .NET 8 WebAPI
### :open_file_folder: System structure:
```
EOM.TSHotelManagement.Web
├─ .git
├─ .gitignore
├─ EOM.TSHotelManagement.Application
│ ├─ EOM.TSHotelManagement.Application.csproj
│ ├─ BaseDto
│ ├─ Business
│ ├─ Employee
│ ├─ Sys
│ ├─ SystemManagement
│ ├─ Util
├─ EOM.TSHotelManagement.Common.Contract
│ ├─ EOM.TSHotelManagement.Common.Contract.csproj
│ ├─ Business
│ ├─ Employee
│ ├─ Sys
│ ├─ SystemManagement
│ ├─ Util
├─ EOM.TSHotelManagement.Common.Core
│ ├─ EOM.TSHotelManagement.Core.csproj
│ ├─ BaseEntity.cs
│ ├─ Business
│ ├─ Employee
│ ├─ Sys
│ ├─ SystemManagement
│ ├─ Util
├─ EOM.TSHotelManagement.EntityFramework
│ ├─ EOM.TSHotelManagement.EntityFramework.csproj
│ ├─ Repository
│ │ └─ GenericRepository.cs
├─ EOM.TSHotelManagement.Migration
│ ├─ EOM.TSHotelManagement.Migration.csproj
│ ├─ EntityBuilder.cs
├─ EOM.TSHotelManagement.Web.sln
├─ EOM.TSHotelManagement.Share
│ ├─ EOM.TSHotelManagement.Share.csproj
│ ├─ Interface
├─ EOM.TSHotelManagement.WebApi
│ ├─ Controllers
│ │ ├─ Business
│ │ ├─ Sys
│ │ ├─ Employee
│ │ └─ SystemManagement
│ │ └─ Util
│ ├─ EOM.TSHotelManagement.WebApi.csproj
│ ├─ EOM.TSHotelManagement.WebApi.csproj.user
│ ├─ EOM.TSHotelManagement.WebApi.xml
│ ├─ Program.cs
│ ├─ Startup.cs
│ ├─ appsettings.Development.json
│ ├─ appsettings.json
├─ LICENSE
├─ README.en.md
└─ README.md
```
### :chart_with_upwards_trend: System database relationship diagram (generated by PDMAN software) :loudspeaker:
[Database Relationship Diagram](https://oscode.top/project/tshotel/db_design.html)
### :exclamation: Project authors:
**Jackson (i.e., this account, project leader, core code writing, and later project integration)**
**Benjamin (Developer, project code writing)**
**Bin (Database, providing database management support)**
**Easy-Open-Meta (late maintenance and development)**
### :computer: Project deployment (before executing the steps below, you need to install .NET 8 SDK and Runtime):
**Download and install Microsoft Visual Studio Professional 2022 or above version, unzip the Zip package, and run the file with .sln suffix to start.**
### :inbox_tray: Database deployment (local):
**Strongly Recommended: Use the First Method for Database Deployment**
**1.Automated Database & Table Creation**
Fill in the `DefaultDatabase` parameter and corresponding connection string in `appsettings.json`, then run the project. This will automatically create the database and tables with one click.
*Prerequisite: The local database must be installed and running.*
**2.Manual Database & Table Creation(Note: Database scripts in the folder may not be the latest version. We strongly recommend Method 1 above!!!)**
Use a visual management tool to open `/Database Scripts/xxxVersion/`, then execute the `tshotel-backstage-dbscript-table.sql` file to create the database and tables.
Next, open the `tshotel-backstage-dbscript-data.sql` file to import initial data.
[](https://gitee.com/java-and-net/topsky-hotel-manager-system-web-api)