Car Rental project with N-Layer Architecture.
In this project, we created a website for car rental using Asp.net Web API + Angular, in fact, we created a platform for the car rental industry, car rental companies will be able to register on our site and reach more customers, customers will be able to rent a car at a cheaper price.
Techs
-
Back-End
- Restful Web Api Vers. .Net Core 3.1
- Multi-Layer Architecture
- Interceptor
- Cache Aspect
- Transaction Aspect
- Performance Aspect
- Validation Aspect(Fluent Validation)
- Authorization
- Authentication
- Autofac
- Json Web Token Managment
- Async Programing
- Cross Cutting Concerns
- SOLID
-
Front-End
- Angular 11
- Bootstrap 5.0
- HttpClient Interceptor
- Guards
- Pipes
- Directives
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
Name | nvarchar(50) | False | |
BrandId | int | False | |
ColorId | int | False | |
ModelId | int | False | |
DailyPrice | decimal(18,0) | False | |
ModelYear | smallint | False | |
Description | nvarchar(50) | True |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
CarId | int | False | |
ImagePath | nvarchar(MAX) | False | |
Date | datetime | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
Name | nvarchar(25) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
Name | nvarchar(25) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
Name | nvarchar(25) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
UserId | int | False | |
CompanyName | nchar(50) | True |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
CarId | int | False | |
CustomerId | int | False | |
RentDate | datetime | True | |
ReturnDate | datetime | True |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
FirstName | nvarchar(50) | False | |
LastName | nvarchar(50) | False | |
nvarchar(50) | False | ||
PasswordHash | varbinary(500) | False | |
PasswordSalt | varbinary(500) | False | |
Status | bit | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
Name | varchar(250) | False |
Name | Data Type | Allow Nulls | Default |
---|---|---|---|
Id | int | False | |
UserId | int | False | |
OperationClaimId | int | False |
We write our workloads on this layer. This layer is the layer that will process the data that has been pulled into the project by Data Access. We do not use the Data Access layer directly in our applications. By putting the Business layer together, we make Business do it for us. The data from the user first goes to the Business layer, and then is processed and transferred to the Data Access layer. In the business tier, we also specify who will access this data. For example, there is R&D and HR section. We want the R&D department to add to the database, but if we want the HR department to only pull the data, we do this in the Business Layer.
In this layer, we have base classes that all projects can use in common.
Only database operations are performed in this layer. The task of this layer is to add, delete, update and extract data from the database. No other action is taken in this layer other than these operations.
In this layer, we determine our main classes that we will use throughout the project, so this is where we determine our real objects. Here, we match the objects we have determined with the objects registered in the database.
Web API Layer that opens the business layer to the internet.
-
.Net Core 3.1 platformu ile geliştirildi.
-
Cross Cutting Concerns "kesişen ilgililer" *interceptor Autofac kütüphanesi kullanılarak geliştirildi.
- Performance
- Transaction
- Validation
- Caching
-
Entity Framework ORM kullanılarak geliştirildi.
-
AOP ile Cross Cutting Concerns "kesişen ilgililer" projede modülarite yapıda geliştirildi.
-
Exception Middleware ile Merkezi hata mekanizması geliştrildi.
-
Claim Mekanizması ile rol bazlı yetkilendirmenin sınırları esnetildi.
-
JWT (JSON Web Token) kimlik doğrulaması entegre edildi.
-
Fluent Validation ile validasyon(doğrulama) işlemleri geliştirildi.
-
IoC(Inversion Of Control) ile (loose coupling) olan nesneler oluşturuldu.
-
REST VE RESTFUL WEB SERVİS ile sunucu-istemci iletişimi sağlandı.
- Core: Toolların diğer projelerde kullanılmasını sağlayan genel bir katmandır.
- Entities: Veritabanındaki tabloları nesneye dönüştürdüğümüz katman.
- DataAccess: Veritabanı işlemlerini yaptığımız katman.
- Business:İş kurallarımızı geliştirdiğimiz katman.
- WebAPI: Restful (Representational State Transfer) HTTP protokolü ile sunucu-istemci iletişimi sağladığımız katman.
Semih Şahan - semihshn.rf.gd
Linkedin - Linkedin
Project Link: https://github.com/semihshn/RentaCar-Back-end
- engindemirog