The Car Rental App is a complete Windows Forms C# .NET CRUD application with almost market-level business logic used to manage the rental of vehicles on a Car Rental Store. As a CRUD application, it allows to create, read, update, and delete data entries from Employees, Clients, Services, Cupons, Partners, Groups of Vehicles, Vehicles, Rentals and Devolutions. To manage the data entries, a valid registered employee must log using valid credentials.
The app uses Entity Framework ORM for the SQL Database Integration, to allow better data scalability and maintenance.
Many other auxiliary libraries were also used, including: "Serilog" for logs, "Moq" for tests that require the use of a mock, "Autofac" for dependency injection and "PdfSharp" for the PDFs of the rental receips.
Finally, the application have a considerable test coverange of 126 tests, divided between Application Tests, ORM Tests and Unit Tests.
- Requires .NET Framework version 4.8 installed.
- If not installed automatically, get the official installation here
- Needs to have a working SQL Server Express LocalDB intance running. By default we use the "MSSQLLocalDb" instance
- To verify if a intance of LocalDB exists, use the command:
SqlLocalDb info
- To run an existing instance of LocalDB, use the command:
SqlLocalDb start NameOfTheDesiredDB
- If the commands above are not recognized as an internal or external command, follow this tutorial to install LocalDB
- To verify if a intance of LocalDB exists, use the command:
- Connect your Visual Studio IDE to a running SQL Server Express LocalDB instance using the "Server Explorer" tab
- Finally, its necessary to update the Entity Framework's migrations
- On the Visual Studio's "Package Manager Console", run the following command to create a new migration:
add-migration devmigration
- Update the database scheme with the following command:
update-database
- On the Visual Studio's "Package Manager Console", run the following command to create a new migration:
To actually open the Car Rental App, you must enter a valid username and password of a registered Employee. To demonstration reasons, you can also bypass this screen using "admin" as both User and Password.
The Dashboard allows the user to view the most important information on the Car Rental App:
- In the "Vehicle" Area, its possible to visualize the ammount of registered Cars, how many are available (able to rent) and unavailable (curently rented).
- In the "Client" Area, its possible to visualize the ammount of registered clients and how many of them are either legal or natural entities.
- In the "Rental" Area, its possible to visuazlie the ammount total ammount of car rents accomplished, how many of the open leases return today and how many return in at least 7 days.
- In the "Services" Area, its possibile to visualize the total ammount of registered rental services
This tab allows the managemenet most basic data entries related to a rental, including Employees, Clients, Services, Groups of Vehicles, Vehicles
You can register new entries or update and delete existing ones. For register and update, keep in mind that many of the fields are validated and will show a error message in the main screen footnote in case of error.
Discounts are an optional feature that allows user to get discounts when applying for a car rental. This tabs allow to manage the data entry related partners and their coupons.
The Rental tab allows start and finish the the rental of an existing car.
To start to rent a car, go to the sub-tab "Rents" and register a new one for a available car to a client for using an expecific type of renting plan and for a determined ammount of time, using multiple optional features like services, insurance a coupons if desired.
After sucessfully renting a car, a PDF receip will appear on the folder "C:\Car Rental App\Recibos" on your computer and the car will become unavailable util his Devolution.
To finish an existig rent, go the sub-tab "Devolution" and choose an open car rent. Here the final value is calculed based on choosen plan type, previous applied coupons, the car milleage, aditional services and how much of gas the car has in the tank. After the Devolution is registered, the car can be rented again.