Database - HeilOliver/Timeify GitHub Wiki

The database was created with Code First using the EntityFramework Core. In this approach, the entities are mapped to classes. The EntityFramework then generates the required database tables automatically.

In addition to the application data created manually, the NetCore Identity Framework is also used, which provides the tables for roles/groups and users.

The database which is used is a MSSQL database version 2019.

The database can be found in the application in the Repository pattern. This means that never the context is passed directly to an usecase instead a repository which is responsible for exactly one entity is passed. This repository then takes care that references are created correctly and constrains are followed. Furthermore, querys can be executed in the repository using the ISpecification interface.

By default, each repository offers the CRUD functionality. Other methods are optional. To integrate the CRUD functionality there is a base class CrudRepository<T> which implements it generically.