/// <summary> /// Constructor /// </summary> /// <param name="client">The instance that implements IDocumentClient</param> public DatabaseInitialiser( IDocumentClient client) { client.NotNull(nameof(client)); _client = client; }
/// <summary> /// Constructor /// </summary> /// <param name="client">The instance that implements IDocumentClient</param> /// <param name="database">The database (must be created before this)</param> public BaseRepository( IDocumentClient client, Database database) { client.NotNull(nameof(client)); database.NotNull(nameof(database)); _client = client; _database = database; Collection = new Lazy <DocumentCollection>(() => { return(GetOrCreateCollection().Result); }); }