How sepcuong/btl_quanlykhachsan works
This repository implements hotel-management APIs for room inventory and pricing, customer and user administration, bookings, service usage, and invoices. The principal workflow is an API request routed to a controller, handled through business and repository layers, and persisted through stored procedures; booking operations include search, cancellation, check-in, and check-out. Two API projects expose overlapping controller sets. The graph reflects documented and indexed dependencies; many implementation files were not excerpted, so uncertain runtime links are omitted.
Main entry points: DatabaseHelper.cs SQL connection helper · BLL Other business services · UserBusiness.cs User business · DatPhongBusiness.cs Booking business
Components 21
API layer
- User API
BTL_QuanLyKhachSan/Controllers/UsersController.cs - Booking API
BTL_QuanLyKhachSan/Controllers/DatPhongController.cs - Room API
BTL_QuanLyKhachSan/Controllers/PhongController.cs - Room pricing API
BTL_QuanLyKhachSan/Controllers/GiaPhongController.cs - Hotel management APIs
BTL_QuanLyKhachSan/Controllers
Business logic
- User business
BLL/UserBusiness.cs - Booking business
BLL/DatPhongBusiness.cs - Other business services
BLL
Persistence
- User repository
DAL/UserRepository.cs - Booking repository
DAL/DatPhongRepository.cs - Room repository
DAL/PhongRepository.cs - Pricing repository
DAL/GiaPhongRepository.cs - Other repositories
DAL - SQL connection helper
DAL/Helper/DatabaseHelper.cs
Domain models
- Booking record
Model/DatPhong.cs - User record
Model/User.cs - Room record
Model/Phong.cs - Room price record
Model/GiaPhong.cs - Hotel domain records
Model
Other components
- API client
- SQL database
Connections 24
- API client → User API: requests
BTL_QuanLyKhachSan/Controllers/UsersController.cs - API client → Booking API: requests
BTL_QuanLyKhachSan/Controllers/DatPhongController.cs - API client → Room API: requests
BTL_QuanLyKhachSan/Controllers/PhongController.cs - API client → Room pricing API: requests
BTL_QuanLyKhachSan/Controllers/GiaPhongController.cs - User API → User business: delegates
BTL_QuanLyKhachSan/Controllers/UsersController.cs - Booking API → Booking business: delegates
BTL_QuanLyKhachSan/Controllers/DatPhongController.cs - Room API → Other business services: delegates
BTL_QuanLyKhachSan/Controllers/PhongController.cs - Room pricing API → Other business services: delegates
BTL_QuanLyKhachSan/Controllers/GiaPhongController.cs - Hotel management APIs → Other business services: delegates
BTL_QuanLyKhachSan/Controllers/DatPhongController.cs - User business → User repository: delegates
BLL/UserBusiness.cs - Booking business → Booking repository: delegates
BLL/DatPhongBusiness.cs - Other business services → Other repositories: delegates
BLL/UserBusiness.cs - Booking repository → SQL connection helper: opens connection
DAL/DatPhongRepository.cs - Room repository → SQL connection helper: opens connection
DAL/PhongRepository.cs - Pricing repository → SQL connection helper: opens connection
DAL/GiaPhongRepository.cs - Other repositories → SQL connection helper: uses connection
DAL/Helper/DatabaseHelper.cs - SQL connection helper → SQL database: connects
DAL/Helper/DatabaseHelper.cs - Booking repository → Booking record: maps records
DAL/DatPhongRepository.cs - Room repository → Room record: maps records
DAL/PhongRepository.cs - Pricing repository → Room price record: maps records
DAL/GiaPhongRepository.cs - User repository → User record: maps records
- Other repositories → Hotel domain records: maps records
DAL/DatPhongRepository.cs - User business → User record: hashes credentials
BLL/UserBusiness.cs - Booking business → Booking record: handles
BLL/DatPhongBusiness.cs