Click or drag to resize

LiteDatabaseGetCollection(String, BsonAutoId) Method

Get a collection using a generic BsonDocument. If collection does not exist, create a new one.

Namespace: Internal.LiteDB
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.1.1.0 (2026.1.1.0)
Syntax
C#
public ILiteCollection<BsonDocument> GetCollection(
	string name,
	BsonAutoId autoId = BsonAutoId.ObjectId
)

Parameters

name  String
Collection name (case insensitive)
autoId  BsonAutoId  (Optional)
Define autoId data type (when document contains no _id field)

Return Value

ILiteCollectionBsonDocument

Implements

ILiteDatabaseGetCollection(String, BsonAutoId)
See Also