aau-giraf / web-api

The backend API for GIRAF — a .NET-core project written in C#.
GNU General Public License v3.0
2 stars 5 forks source link

Removing the need for using EF tools #327

Closed KristianS93 closed 11 months ago

KristianS93 commented 1 year ago

Description

The docs specify that you have to install dotnet ef core tools, to create migrations and add them to the database as the schema. This is not necessarily a requirement.

An update for the developers building on GIRAF, will probably experience less issues understanding the API when starting, and the need for ef-core tools, if they haven't worked on it before.

Possible Suggested Solution
The solution would be to create an extension method of the asp.net core webapplication builder, and do a connection check on the database and then use this method: EnsureCreated as this method will migrate the current migration to the database.

Definition of Done