DEV Community

Cover image for .NET 5 with RavenDB Series -2
Assis Zang
Assis Zang

Posted on • Updated on

.NET 5 with RavenDB Series -2

Installing RavenDB

In this second post of the series we will download RavenDB and run it through Docker.
For that you will need to have Docker, you can download it here.

Running on Docker

If you have Docker installed, run the following command on terminal:

docker run -p 8080:8080 -e RAVEN_ARGS="--Setup.Mode=None --License.Eula.Accepted=true" ravendb/ravendb

With this command Docker will download the latest version of RavenDB and activate a new container to host it. Note that we run in developer mode without any authentication. You can see how RavenDB works in Docker by following the official documentation.

Accessing the Dashboard

If you ran the previous section, RavenDB will be running locally and you can access it at:

http://localhost:8080

When accessing the RavenDB dashboard for the first time, you will need to do a little configuration. You just need to answer the questions. You can consult the official documentation to learn more.

If everything went as expected you will see RavenDB Dashboard βœ¨πŸŽ‰πŸŽ‡

Alt Text

Creating a Database

To create your first database
1 - Select the Database option in the left panel.
2 - Click on the New Database button.
3 - Type a name for the new database (Northwind is recommended)
4 - Click on the Create button

βœ¨πŸŽ‰πŸŽ‡ You just created your first RavenDB database. But it's empty.

Loading Sample Data

Let’s load some sample data into our database.
1 - Select Databases on the left panel
2 - In the right panel, click on the name of the database you just created (that is empty for a while)
3 - In the left panel, click on Settings, and then Create Sample Data
4 - Click on the Create button

Alt Text

The Northwind database is the sample database that comes with SQL Server; It has been used for decades as the sample database in the Microsoft community.
Likewise it is used by the RavenDB team to give us a nice example of data. πŸ’–πŸ‘πŸ€©

In the Documents section (left pane) you will see that there are many example documents for you to use.

Alt Text

We've just created our first database and loaded some sample data.
And now we have everything we need set up to start our first .NET app with RavenDB.
In the next section we will do this.

You can get more information about this lesson at Bootcamp RavenDB

Latest comments (0)