A linq enabled second generation document database for .NET
Switch branches/tags
Clone or download
Pull request Compare This branch is 1 commit ahead, 992 commits behind ravendb:v4.0.
Fitzchak Yitzchaki
Fitzchak Yitzchaki RavenDB-11077 Avoid using HashSet when expecting a list which preserv…
…ed the insertion order.
Latest commit c71b68a May 10, 2018
Permalink
Failed to load latest commit information.
ToMigrate RavenDB-8809 : no need to migrate JsonCodeGeneratorTests Oct 30, 2017
bench RavenDB-7070 updated to .NET Core 2.0.7 Apr 19, 2018
docker RavenDB-10344: Exit container with Raven's exit code Mar 15, 2018
docs RavenDB-10467 Setup instructions URL is wrong Feb 15, 2018
libs RavenDB-10981 : use updated nuget package instead of custom dll Apr 23, 2018
scripts RavenDB-10969 FIX setup-as-service.ps: Cannot find path '...\Server\s… Apr 20, 2018
src RavenDB-11077 Avoid using HashSet when expecting a list which preserv… May 10, 2018
test RavenDB-110054 fix failures of 3rd assert May 9, 2018
tools RavenDB-10634 removed Raven.Traffic May 9, 2018
.editorconfig RavenDB-7070 Apr 16, 2018
.gitattributes RavenDB-6243 delete ravendbd temporarily to readd it later Feb 7, 2017
.gitignore RavenDB-10587 commit package-lock.json Feb 21, 2018
LICENSE RavenDB-10097 updated EULA May 8, 2018
NuGet.Config updating packages, renaming conventions Nov 9, 2017
RavenDB.ruleset RavenDB-7070 CancellationToken should be last argument (server-side) Dec 20, 2017
RavenDB.sln RavenDB-10634 removed Raven.Traffic May 9, 2018
RavenDB.sln.DotSettings RavenDB-6572 removed TestIndex feature via #FEATURE_TEST_INDEX Nov 26, 2017
RavenDB.snk RavenDB-9041 signing DLLs Dec 12, 2017
build.ps1 RavenDB-10363 build script seem not to clean src/Rave/Server/bin and … Mar 15, 2018
build.sh RavenDB-9435 updated install_build_prerequisites.sh Dec 12, 2017
git_setup.cmd RavenDB-4343 migrated git pre-commit hook Feb 11, 2016
git_setup.sh pre-commit sh 2 bash Apr 21, 2016
install_build_prerequisites.sh RavenDB-7070 updated to .NET Core 2.0.7 Apr 19, 2018
install_runtime_prerequisites.sh RavenDB-9435 updated install_build_prerequisites.sh Dec 12, 2017
readme.md RDoc-0000 update readme Apr 17, 2018
testInLoop.sh Fix Tests: Subscription Dec 25, 2016
upload.ps1 RavenDB-9540 Prepare build scripts for RTM - upload scripts Dec 15, 2017

readme.md

RavenDB - An ACID NoSQL Document Database

This repository contains source code for the RavenDB document database. With a RavenDB database you can set up a NoSQL data architecture or add a NoSQL layer to your current relational database.

RavenDb Studio

Supported Platforms

  • Windows
  • Linux
  • Docker
  • MacOS
  • Raspberry Pi

Grab Your License and Latest Version

Download the latest version of RavenDB

Getting Started

Install and set up your database.

Learn RavenDB Quickly

RavenDB Bootcamp is a free, self-directed learning course. In just three units you will learn how to use RavenDB to create fully-functional, real-world programs with NoSQL Databases. If you are unfamiliar with NoSQL, it’s okay. We will provide you with all the information you need.

Stay Updated on New Developments

We are always adding new features to improve your RavenDB experience. Check out our latest improvements, updated weekly.

Documentation

Access full documentation for RavenDB. Like our database, it is easy to use.

Where to Ask for Help

If you have any questions, or need further assistance, you can contact us directly.

Report an Issue

You can create issues and track them at our YouTrack page.

RavenDB Developer Community Group

If you have any questions please visit our community group. The solutions for the most common challenges are available. You are welcome to join!

Submit a Pull Request

Each Pull Request will be checked against the following rules:

  • cla/signed - all commit authors need to sign a CLA. This can be done using our CLA sign form.
  • commit/whitespace - all changed files cannot contain TABs inside them. Before doing any work we suggest executing our git_setup.cmd. This will install a git pre-commit hook that will normalize all whitespaces during commits.
  • commit/message/conventions - all commit messages (except in merge commits) must contain an issue number from our YouTrack e.g. 'RavenDB-1234 Fixed issue with something'
  • tests - this executes build.cmd Test on our CI to check if no constraints were violated



Setup & Run

Prerequisites:

Windows

Microsoft Visual C++ 2015 Redistributable Package should be installed prior to RavenDB launch. Visual C++ Downloads See also: Windows Prerequisites

Linux/MacOS

It is recommended that you update your OS before launching an instance of RavenDB. For example, Ubuntu-16.x as an updated OS doesn't require any additional packages. libsodium (1.0.13 or up) must be installed prior to RavenDB launch.

In Ubuntu 16.x: apt-get install libsodium18
In MacOS 10.12: brew install libsodium

You might need to also install additional packages, for example:

apt-get install libunwind8 liblttng-ust0 libcurl3 libssl1.0.0 libuuid1 libkrb5-3 zlib1g libicu55

See also: Linux Prerequisites or MacOS Prerequisites

Lauch RavenDB:

Running locally:

<path/to/ravendb>/Server/Raven.Server

Registering as service in Windows:

.\rvn.exe windows-service register --service-name RavenDB4

Running as service in Linux, add to your daemon script:

<path/to/ravendb>/Server/Raven.Server --daemon

Hello World (.NET)

Server Side

  • Launch a RavenDB server instance as follows:
   <path/to/ravendb>/Server/Raven.Server --ServerUrl=http://localhost:8080
  • Open a web browser and enter http://localhost:8080
  • Click on Databases on the left menu, and then create a new database named SampleDataDB
  • Click on Settings and then on Create Sample Data in the left menu. Now Click on Create

Client Side

   mkdir HelloWorld
   cd HelloWorld
   dotnet new console
  • Add the RavenDB Client package:
   dotnet add package RavenDB.Client --version 4.0.0-*
  • Replace the content of Program.cs with the following:
using System;
using Raven.Client.Documents;

namespace HelloWorld
{
    class Shippers
    {
        public string Name;
        public string Phone;
    }
    
    class Program
    {
        static void Main(string[] args)
        {
            using (var store = new DocumentStore
            {
                Urls = new string[] {"http://localhost:8080"},
                Database = "SampleDataDB"
            })
            {
                store.Initialize();

                using (var session = store.OpenSession())
                {
                    var shipper = session.Load<Shippers>("shippers/1-A");
                    Console.WriteLine("Shipper #1 : " + shipper.Name + ", Phone: " + shipper.Phone);
                }
            }
        }
    }
}
  • Type:
   dotnet restore
   dotnet build
   dotnet run
Enjoy :)