DEV Community

loading...
Cover image for CRUD with .NET5 Web API and RavenDB

CRUD with .NET5 Web API and RavenDB

Assis Zang
.NET Developer πŸ‘¨πŸ»β€πŸ’» | writing code with πŸ’–
・Updated on ・1 min read

Recently I met RavenDB, a NoSQL database that has some differences compared to the famous MongoDB such as its construction made in C#, its creator Oren Eini is a great contributor to the .NET community, its ease of installation and handling and its beautiful user interface.

Based on these attributes, I decided to invest a little time to learn more about this NoSQL database, which already has 10 years of existence and can easily face one of the best known NoSQL databases today.

For that I created a very simple project, an API in .NET 5 with Visual Studio 2019 (You can use VS Code if you prefer) I installed the RavenDB client and then created the database connection and the methods for CRUD.
An interesting detail is that with RavenDB you can insert new data or update existing data using the same function, the secret is the id, if it is null Raven identifies that you are inserting new data, but if it is filled and it is valid it just updates the registry.

You can check the project here:
Github repository

The readme has a very basic guide on how to download and install RavenDB on your machine.

Alt Text

Feel free to clone or fork the project. Suggestions, criticism and praise are also welcome πŸ˜‰.

Photo by Tyler Quiring on Unsplash

Discussion (0)