Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/akifzdemir/rentacarproject

Rent A Car project C# Backend
https://github.com/akifzdemir/rentacarproject

crud csharp dotnet rentacar

Last synced: about 2 months ago
JSON representation

Rent A Car project C# Backend

Awesome Lists containing this project

README

        

#

.Net backend Project


**Frontend of this project : https://github.com/akifz21/rentACarReactFrontend**

## Contents
- [Getting Started](#getting-started)
* [Installation](#installation)
* [Usage](#usage)
- [Tech Stack](#tech-stack)

## Getting Started

### Installation

1. Clone the repo:

```sh
git clone https://github.com/akifz21/RentACarProject.git
```
2. Open the `RentACar.sln` file with `Visual Studio`
3. Open the `appsettings.json` file in the `WebApi` folder and enter your own database connection string
4. Open `Package Manager Console - Default Project: DataAccess` and run the following commands for migrate database:

```sh
update-database
```
`NOTE:`
```sh
Or Migrates automatically when you start the project
```

5. Right click on the `WebAPI` project (layer) from the `Solution Explorer` and select `Set as Startup Project`
6. Start the project with `WebApi` in Visual Studio. Web API is ready and running!
8. `NOTE:`
Owner account of default products [email protected] password=12345678

### Usage

After running the Web API, you can make HTTP requests like:

```sh
https://localhost:7012/api/`CONTROLLER_NAME`/`METHOD_NAME`
```

`CONTROLLER_NAME` => Each .cs file located in the `WebAPI.Controllers` folder (For example CONTROLLER_NAME for `CarsController`: Cars )



`METHOD_NAME` => All of the methods in each .cs file in the `WebAPI.Controllers` folder

#### Sample HTTP GET requests:

1. List all Products:
```sh
https://localhost:7012/api/Cars/getall
```
2. List a brand by id:
```sh
https://localhost:7012/api/brands/getbyid?id=3
```
3. List all Product colors:
```sh
https://localhost:7012/api/colors/getall
```

## Tech Stack
| Technology / Library | Version |
| ------------- | ------------- |
| .NET | 6.0 |
| Autofac | 6.4.0 |
| Autofac.Extensions.DependencyInjection | 8.0.0 |
| Autofac.Extras.DynamicProxy | 6.0.1 |
| FluentValidation | 11.1.0 |
| Microsoft.AspNetCore.Authentication.JwtBearer | 6.0.7 |
| Microsoft.AspNetCore.Http | 2.2.2 |
| Microsoft.AspNetCore.Http.Abstractions | 2.2.0 |
| Microsoft.AspNetCore.Features | 5.0.17 |
| Microsoft.EntityFrameworkCore | 6.0.7 |
| Microsoft.EntityFrameworkCore.Tools | 6.0.7 |
| Microsoft.EntityFrameworkCore.Design | 6.0.7 |
| Microsoft.EntityFrameworkCore.InMemory | 6.0.7 |
| Microsoft.EntityFrameworkCore.SqlServer | 6.0.7 |
| Microsoft.Extensions.Configuration | 6.0.1 |
| Microsoft.Extensions.Configuration.Json | 6.0.1 |
| Microsoft.Extensions.Configuration.Binder | 6.0.0 |
| Microsoft.Extensions.DependencyInjection.Json | 6.0.0 |
| Microsoft.IdentityModel.Tokens | 6.12.2 |
| System.IdentityModel.Tokens.Jwt | 6.12.2 |
| Swashbuckle.AspNetCore | 6.2.3 |