MvvX.CouchBaseLite

Using the CouchBaseLite-Plugin for MvvmCross is quite simple. The plugin injects the ICouchBaseLite interface into the IoC container.

Build

Build status

Nuget

Project Nuget
CouchBase NuGet package
CouchBase with SQLCipher NuGet package
CouchBase with ForestDB NuGet package

Nuget Installation

Install MvvX.CouchBaseLite from nuget.

Important: You will need to add the nuget package to both your PCL project and your platform-dependent project.

Please Contribute!

This is an open source project that welcomes contributions/suggestions/bug reports from those who use it.

If you have any ideas on how to improve the library, please post an issue here on github. Please check out the How to Contribute.

Example

API

The API of ICouchBaseLite is very easy to understand and to use.

public interface ICouchBaseLite : IDisposable
{
	IDatabase Database { get; }
	bool CreateConnection(string workingFolderPath, string databaseName);
}

CouchBaseLite Connection

Using the name of the database and the folder on the client device where to store database files:

            ICouchBaseLite service = Mvx.Resolve<ICouchBaseLite>();

            var databaseName = "MvvXPluginTest";
            var databaseFolderPath = Path.Combine(Path.GetTempPath(), "testCouchDb");

            // Connect to the database
            var successConnection = service.CreateConnection(databaseFolderPath, databaseName);

To be complete...