A code test for Kolmeo
Create a simple service that can be used to add and retrieve products via a public endpoint. Use this as an opportunity to flex your engineering and create a small production ready api.
{
Id
Name
Description
Price
}
- ASP.NET Core
- Entity Framework Core
- Authentication
- Persistence
NB: As this is a common api for products CRUD, so parts of codes are copied from my existing project.
Looger: default .net logging DBContext: KolmeoDataContext ProductProvider: for CRUD
SqlLite is used for saving products in DB KolmeoDataContext is the DB Context for products
To make SqlLite works on your local
dotnet tool install --global dotnet-ef
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet ef migrations add InitialCreate
dotnet ef database update
Swagger APIVersioning HealthCheck
As the limit time, I just write test cases for GetAll and GetById endpoints in controller, to show my test skills,
TODO: test cases for Create/Update/Delete in controller test cases for ProductProvider
Api.Products is the startup project
Option 1:
Run in VS Studio with F5
Option 2: run in console
bash dotnet run