/TechTest

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

Primary LanguageC#

TechTest

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

πŸ“— Table of Contents

πŸ“– 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

Start Game Method:

Start

Make Move Method:

MakeMove

End Game Method:

End

Historic Results Request:

Historic Results Request

Historic Results Response:

Historic Results Response

πŸ›  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
  1. Run next commands to generate the database from TT.DataAccess project:
   dotnet ef migrations add InitialCreate 
   dotnet ef database update
  1. Create a User as db_owner of this batabase

  2. 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

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(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?

(back to top)

πŸ“ License

This project is MIT licensed.

MIT license

(back to top)