Click or drag to resize

LiteRepository Methods

The LiteRepository 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 methodDispose 
Protected methodDispose(Boolean) 
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 methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFetchT(BsonExpression, String) Execute Query[T].Where(predicate).ToList();
Public methodFetchT(ExpressionFuncT, Boolean, String) Execute Query[T].Where(predicate).ToList();
Protected methodFinalize
(Overrides ObjectFinalize)
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 methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
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
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
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 methodToStringReturns a string that represents the current object.
(Inherited from Object)
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
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also