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

https://github.com/neckerfree/techtest

Web API for the program that plays Rock, Paper, Scissors against a human.
https://github.com/neckerfree/techtest

Last synced: about 2 months ago
JSON representation

Web API for the program that plays Rock, Paper, Scissors against a human.

Awesome Lists containing this project

README

          

ο»Ώ# TechTest
Web API for the program that plays Rock, Paper, Scissors against a human.

# πŸ“— Table of Contents

- [πŸ“– About the Project](#about-project)
- [πŸ›  Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [πŸ’» Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [πŸ‘₯ Authors](#authors)
- [⭐️ Show your support](#support)
- [❓ FAQ (OPTIONAL)](#faq)
- [πŸ“ License](#license)

# πŸ“– TechTest

**TechTest** is a .NET Solution that uses a layer architecture to expose a minimal Web API
for the program that plays Rock, Paper, Scissors against a human..

## Web API Service Images:
***Swagger Index:***

![Swagger](https://user-images.githubusercontent.com/8497300/214976709-abb1dc89-5a17-4c9c-9722-53d9f4b9e491.png)

***Start Game Method:***

![Start](https://user-images.githubusercontent.com/8497300/214976811-9c00ff7a-e9c4-4597-a6d7-ec9272909253.png)

***Make Move Method:***

![MakeMove](https://user-images.githubusercontent.com/8497300/214976869-cc25c801-6fc5-4c48-9487-e06ae500f10d.png)

***End Game Method:***

![End](https://user-images.githubusercontent.com/8497300/214976984-a6f71fc1-b0df-4c71-b5b3-21248277da28.png)

***Historic Results Request:***

![Historic Results Request](https://user-images.githubusercontent.com/8497300/214977101-7902a5d1-4b73-43e7-ab85-8db41f052fc5.png)

***Historic Results Response:***

![Historic Results Response](https://user-images.githubusercontent.com/8497300/214977172-e69c7693-1986-467d-8057-b132e3ab23bf.png)

## πŸ›  Built With

### Tech Stack

.NET Core Minimal API,

Server

Database

### Key Features

> Describe between 1-3 key features of the application.

- **EF Core Database First**
- **Unit of Work and Repository Pattern**
- **Services Dependency Injection**
- **Data Annotations**
- **Extension Methods**
- **Dependency Injection**
- **Paging**
- **GIT Flow**

(back to top)

## πŸ’» Getting Started

To get a local copy up and running, follow these steps:

### Prerequisites

In order to run this project you need:

- Visual Studio .NET 2022 updated to use NET Core 7
- SQL Server Database

### Setup

1. Clone this repository to your desired folder:

```
cd my-folder
git clone https://github.com/NeckerFree/TechTest
```

2. Run next commands to generate the database from TT.DataAccess project:
```
dotnet ef migrations add InitialCreate
dotnet ef database update
```

3. Create a User as db_owner of this batabase

4. Modify the connection string (GamesConnection) in the file \TT.MinApi\appsettings.json to point your database
### Install

Install this project with:
1. Build the solution and assure that doesn't have errors

2. Set the project TT.MinApi as default

### Usage

To run the project,

Start the application (F5), the /swagger/index.html page is displayed

(back to top)

## πŸ‘₯ Authors

πŸ‘€ **Elio CortΓ©s**

- GitHub: [@NeckerFree](https://github.com/NeckerFree)
- Twitter: [@ElioCortesM](https://twitter.com/ElioCortesM)
- LinkedIn: [elionelsoncortes](https://www.linkedin.com/in/elionelsoncortes/)

(back to top)

## 🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](../../issues/).

(back to top)

## ⭐️ Show your support

If you like this project please start my project

(back to top)

## ❓ FAQ (OPTIONAL)

- **What command are required to Scaffold from Scratch a DB First?**

- Run next commands:
```
dotnet add TT.DataAccess package Microsoft.EntityFrameworkCore.Design
dotnet add TT.DataAccess package Microsoft.EntityFrameworkCore.SqlServer
dotnet add TT.DataAccess package Microsoft.EntityFrameworkCore.Tools
dotnet tool update --global dotnet-ef
dotnet ef dbcontext scaffold "Data Source=localhost\ELIO_SQL;Initial Catalog=[your DB]; User Id=[your User];Password=[your Pwd];Encrypt=False" Microsoft.EntityFrameworkCore.SqlServer --project TT.DataAccess --output-dir "TT.Models\Models" --context-dir "TT.DataAccess\Data" --namespace TT.Models --context-namespace TT.DataAccess --context GamesContext -f --no-onconfiguring --data-annotations
dotnet tool install --global dotnet-ef
dotnet tool update --global dotnet-ef
```
- **How to Implement Unit Of Work and Generic Repository pattern?**
- [Unit Of Work And Generic Repository pattern](https://www.c-sharpcorner.com/article/implement-unit-of-work-and-generic-repository-pattern-in-a-web-api-net-core-pro)
- [Repository Pattern and Unit of Work](https://enlear.academy/repository-pattern-and-unit-of-work-with-asp-net-core-web-api-6802e1aa4f78)

(back to top)

## πŸ“ License

This project is [MIT](./LICENSE) licensed.

[MIT license](https://choosealicense.com/licenses/mit/)

(back to top)