Skip to content

Installation and Configuration

Thijs Brobbel edited this page May 26, 2020 · 6 revisions

Nuget Installation

The easiest way to install this library is with NuGet.

Using the Package Manager Console in visual studio:

PM> Install-Package RavenDB.Client.NodaTime

Or simply find the RavenDB.Client.NodaTime package in the NuGet Package Manager GUI and add it to your project.

Manual Installation

  • Download the release from here.
  • Extract the zip file, and copy from the Client directory.
  • Add a reference to the .dll file in your project in Visual Studio.
  • The .dll is required to be deployed with your application.
  • The .xml and .pdb files will support Intellisense and debugging during development.
  • Be sure that you are also referencing the Noda Time and RavenDB assemblies.

Configuration

First, import the following namespaces:

using NodaTime;
using Raven.Client.NodaTime;

Now add a single line to your code, right after the RavenDB initialization call.

documentStore.ConfigureForNodaTime();  // insert this single line
documentStore.Initialize();            // you should already have this

You can now use Noda Time types and they should be understood by the RavenDB client.