Click or drag to resize

LiteDatabaseGetCollectionT(String, BsonAutoId) Method

Get a collection using an entity class as strong typed document. 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<T> GetCollection<T>(
	string name,
	BsonAutoId autoId = BsonAutoId.ObjectId
)

Parameters

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

Type Parameters

T

Return Value

ILiteCollectionT

Implements

ILiteDatabaseGetCollectionT(String, BsonAutoId)
See Also