Click or drag to resize

Database Constructor

Creates a database with a given name and database configuration. If the configuration is null then the default configuration will be used. If the database does not yet exist, it will be created.

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.1.0-b0232
Syntax
C#
public Database(
	string name,
	DatabaseConfiguration configuration = null
)

Parameters

name
Type: SystemString
The name of the database
configuration (Optional)
Type: Couchbase.LiteDatabaseConfiguration
The database configuration, or null for the default configuration
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if name is null
CouchbaseLiteExceptionThrown with CantOpenFile if the directory indicated in configuration could not be created
CouchbaseExceptionThrown if an error condition was returned by LiteCore
See Also