A minimum effort API for small scale data management. I use a simple json-file as "database" and I can use all typicall HTTP-verbs to interact with that database. The API allows for Oauth authorization
This API uses asp.net core V 2.1 (I found this to be more stable than the newer one). The solution is split into 4 projects
- MiniAPI: here you place all your controllers and the ASP.NET Core files (Program.cs and Startup.cs)
- Definitions: here you can place all generic classes and interfaces
- Repository: here the reading and writing of the json-Database is performed
- Services: the injected services for the controllers
Well, its not really a database, it just a json File with all "tables" as items in the first level, something like
{ "Table1" : [ { // anything }, { // anything }, ], "Table2" : [ .... ] }
etc.
All the references and id checks you'd have to perform yourself in the services or in the baserepository (I think its better in the services).