Hexina is a modern web application built with ASP.NET 8 MVC for managing car rentals. Users can register, log in, and book available cars. Admins can manage car brands, features, and inventory through a secure panel. The system features dynamic filtering and date-aware booking to prevent double reservations.
- Register & login using Microsoft Identity
- Browse and filter cars by brand, features, or availability
- Book a car for specific dates
- Cancel bookings (only if the start date hasn't passed)
- Only available cars for the selected date range are shown
- Secure admin dashboard
- CRUD operations for:
- Brands
- Features
- Cars
- View and manage all bookings
- ✅ ASP.NET 8 MVC
- ✅ Entity Framework Core
- ✅ LINQ
- ✅ SQL Server
- ✅ Bootstrap 5
- ✅ Microsoft Identity
- ✅ Clean Architecture (4-Tiered)
- ✅ Repository Pattern (with Base Repository)
- ✅ DTOs, ViewModels, Services
- ✅ OOP Principles (Interface Segregation, DRY, YAGNI)
- ✅ Identity Seeder for roles and default admin
You can run this project like any standard .NET 8 MVC application. 😉
-
Clone the repository
git clone https://github.com/Meltorky/Car-Rental-Company.git
-
Open the solution in Visual Studio 2022 or later
-
Update appsettings.json
Add your SQL Server connection string.
-
Apply migrations
Update-Database
-
Run the application
Hit F5 or press "Run".
- This project was built using best practices in real-world software development:
- Clean separation of layers: Presentation, Application, Infrastructure, and Domain
- Reusable base repository for all entities
- Asynchronous methods for better performance
- Booking logic ensures no car is double-booked, by preventing selection if already reserved for the selected date range.
erDiagram
BaseEntity {
int Id PK
string Name
}
ApplicationUser {
string Id PK
string UserName
string Email
string FullName
}
Brand {
int Id PK
string Name
string ImageUrl
}
Car {
int Id PK
string Name
byte[] CarImage
double PricePerDay
int Year
CarTransmission carTransmission
CarFuel carFuel
CarBodyType carBodyType
bool IsExist
int BrandId FK
}
Feature {
int Id PK
string Name
}
CarFeature {
int CarId FK
int FeatureId FK
}
Booking {
int BookingId PK
DateOnly BookingStartDate
DateOnly BookingEndDate
double TotalCost
string Address
string UserId FK
int CarId FK
}
BaseEntity ||--|| Brand : "inherits"
BaseEntity ||--|| Car : "inherits"
BaseEntity ||--|| Feature : "inherits"
Brand ||--o{ Car : "has many"
Car ||--o{ CarFeature : "has"
Feature ||--o{ CarFeature : "belongs to"
ApplicationUser ||--o{ Booking : "makes many"
Car ||--o{ Booking : "booked in"
ApplicationUser ||--|| IdentityUser : "inherits"





