My view of what a timelogger is, used for project control and invoices.
Some of the docs is found here, how I've provided a solution for the challenge. link to Diagrams!
Providing the ability to test the controllers.
- ProjectControllerTests
Tests the Projects controller, if it's able to extract data from the given repository.
- GetAll, should give an Ok Status Code 200 when tested.
- GetById, returns 3 different codes, whether if it Fails, No Content or Ok.
- ApiDatabaseTests
Tests if it's possible to connect correctly to the database.
- It's being validated if the connection is Closed, Connection, Open, Closing or Broken.
The usage of the few controllers, to make it possible to manipulate the available data.
- POST: api/projects
Creates a new project, with a JSON object from the body.
{ "ProjectName": "User 2 Project 1", "ProjectOwner": { "EntityId": 2 //Project Owner, from a valid user entity. }, "ProjectCustomer": { "EntityId": 1 //The Customer of the project, with a valid customer entity. }, "ProjectDateOfCreation": "2020-10-02", "ProjectDeadline": "2020-11-10" }
- GET: api/projects
Returns JSON objects with the available projects.
- GET: api/projects/1
Returns a JSON object of the available project.
- GET: api/projects/user/1
Returns JSON objects with the available projects for the specified user.
- GET: api/projects/1/registrations
Returns a JSON object with project if available, containing an array of time registrations.
- POST: api/registrations
Creates a registration for a project, with a JSON object from the body.
{ "ProjectID": 1, "Time": "1:20:48" //The Time is given in string, and converted to a TimeSpan by the system. }
Made with love and passion for a development challenge, provided by VISMA E-Conomic
- .NET Core 3.1
- Visual Studio Enterprise
- React Front-End Framework
- NUnit Testing
- Repositories is being dependency injected into the controllers from the Startup class.
- The Database connection is currently hardcoded into the ApiDatabase class.
- Scripts to the database, needs to be fired in MSSQL, as it's been created with T-SQL.
- Singleton Pattern
- Repository Pattern
- Factory Pattern
- Dependency Injection
- Using SOLID Principles
iZeQure, AKA Tobias Rosenvinge - Student, studying software engineering in Denmark.