This is a simple web API for car renting. It is a project for the course "Design Patterns" at the Faculty of Computer Science.
This project is a simple web API for car renting. It is a project for the course "Design Patterns" at the Faculty of Computer Science. The project is developed using .NET 6.0 and Web API. The project is developed using the following design patterns:
- Singleton
- Factory
- Decorator
- Strategy
- Command
This is a creational design pattern that ensures that only one instance of a class is created. This could be useful in a car rental project for managing shared resources such as a class that has list of entities like a database.
This is a creational design pattern that provides a way to create objects without specifying the exact class of object that will be created. This is useful in a car rental project because it allows you to create pricing strategy with different types of cars.
This is a structural design pattern that allows you to add new behavior to an object dynamically. This could be useful in a car rental project for adding additional features to rent car such as Discount decorator.
This is a behavioral design pattern that allows you to change the behavior of an object at runtime. In a car rental project, this could be useful for implementing different pricing strategies.
This is a behavioral design pattern that allows you to encapsulate a request as an object, which can then be passed around and executed later. This could be useful in a car rental project for implementing undo/redo functionality for rental bookings or for implementing a workflow for processing rental requests.
- Create a new car
- Create a new customer
- Create a new rental
- Get all cars
- Get all customers
- Get all rentals
- Get a car by id
- Get a customer by id
- Get a rental by id
- Delete a car
- Delete a customer
- Delete a rental
And more...
- Clone the repository
- Open the solution in Visual Studio
- Run the project
- Open Postman
- Import the collection from the repository
- Run the requests
If you have any feedback, please reach out to us at email. If you run into a problem, you can let me know here or on my Twitter account. - @Mehmetkaragoz07