Web API for the program that plays Rock, Paper, Scissors against a human.
- π About the Project
- π» Getting Started
- π₯ Authors
- βοΈ Show your support
- β FAQ (OPTIONAL)
- π License
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..
Swagger Index:
Start Game Method:
Make Move Method:
End Game Method:
Historic Results Request:
Historic Results Response:
.NET Core Minimal API,
Server
Database
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
To get a local copy up and running, follow these steps:
In order to run this project you need:
- Visual Studio .NET 2022 updated to use NET Core 7
- SQL Server Database
- Clone this repository to your desired folder:
cd my-folder
git clone https://github.com/NeckerFree/TechTest
- Run next commands to generate the database from TT.DataAccess project:
dotnet ef migrations add InitialCreate
dotnet ef database update
-
Create a User as db_owner of this batabase
-
Modify the connection string (GamesConnection) in the file \TT.MinApi\appsettings.json to point your database
Install this project with:
-
Build the solution and assure that doesn't have errors
-
Set the project TT.MinApi as default
To run the project,
Start the application (F5), the /swagger/index.html page is displayed
π€ Elio CortΓ©s
- GitHub: @NeckerFree
- Twitter: @ElioCortesM
- LinkedIn: elionelsoncortes
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project please start my project
-
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?
This project is MIT licensed.