Skip to content

SognoLucido/MongoCRUD-api

Repository files navigation

MongoCrud

CRUD api Based on randomuser.me/api model

Tools and Technologies :

  • ASP.NET Core Web API
  • .net8
  • serilog(appsettings base config) console & file
  • Mvc Controllers
  • Minimal api (check branch)
  • apikey auth
  • xunit
  • Testcontainers
  • SwaggerUI
  • docker / compose
  • Mongodb
  • MongoDB.Driver

Note

The database is empty by default. Copy the body from https://randomuser.me/api/?results=1; it's a 1:1 ,
and then post it to /api/user to fill the database .
You can also POST multiple results ( ?results=x )

Screenshot 2024-05-09 122011

The POST endpoint includes duplicate protection before inserting data into the database

TODO

  • Optimize queries
  • Logging to a file and retrieving log information using apikey
  • Unit/Integ testing
  • Docker implementation
  • .net9
  • Aspire
  • ms Openapi

About

.net 8 crud webapi with mongodb. User database based on the https://randomuser.me/api/ model (1:1 mapping)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published