Click or drag to resize

ILiteRepository Methods

The ILiteRepository type exposes the following members.

Methods
 NameDescription
Public methodDeleteT Delete entity based on _id key
Public methodDeleteManyT(BsonExpression, String) Delete entity based on Query
Public methodDeleteManyT(ExpressionFuncT, Boolean, String) Delete entity based on predicate filter expression
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable)
Public methodEnsureIndexT(BsonExpression, Boolean, String) Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
Public methodEnsureIndexT(String, BsonExpression, Boolean, String) Create a new permanent index in all documents inside this collections if index not exists already. Returns true if index was created or false if already exits
Public methodEnsureIndexT, K(ExpressionFuncT, K, Boolean, String) Create a new permanent index in all documents inside this collections if index not exists already.
Public methodEnsureIndexT, K(String, ExpressionFuncT, K, Boolean, String) Create a new permanent index in all documents inside this collections if index not exists already.
Public methodFetchT(BsonExpression, String) Execute Query[T].Where(predicate).ToList();
Public methodFetchT(ExpressionFuncT, Boolean, String) Execute Query[T].Where(predicate).ToList();
Public methodFirstT(BsonExpression, String) Execute Query[T].Where(predicate).First();
Public methodFirstT(ExpressionFuncT, Boolean, String) Execute Query[T].Where(predicate).First();
Public methodFirstOrDefaultT(BsonExpression, String) Execute Query[T].Where(predicate).FirstOrDefault();
Public methodFirstOrDefaultT(ExpressionFuncT, Boolean, String) Execute Query[T].Where(predicate).FirstOrDefault();
Public methodInsertT(IEnumerableT, String) Insert an array of new documents into collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents
Public methodInsertT(T, String) Insert a new document into collection. Document Id must be a new value in collection - Returns document Id
Public methodQueryT Returns new instance of LiteQueryable that provides all method to query any entity inside collection. Use fluent API to apply filter/includes an than run any execute command, like ToList() or First()
Public methodSingleT(BsonExpression, String) Execute Query[T].Where(predicate).Single();
Public methodSingleT(ExpressionFuncT, Boolean, String) Execute Query[T].Where(predicate).Single();
Public methodSingleByIdT Search for a single instance of T by Id. Shortcut from Query.SingleById
Public methodSingleOrDefaultT(BsonExpression, String) Execute Query[T].Where(predicate).SingleOrDefault();
Public methodSingleOrDefaultT(ExpressionFuncT, Boolean, String) Execute Query[T].Where(predicate).SingleOrDefault();
Public methodUpdateT(IEnumerableT, String) Update all documents
Public methodUpdateT(T, String) Update a document into collection. Returns false if not found document in collection
Public methodUpsertT(IEnumerableT, String) Insert or Update all documents based on _id key. Returns entity count that was inserted
Public methodUpsertT(T, String) Insert or Update a document based on _id key. Returns true if insert entity or false if update entity
Top
See Also