Lite |
The LiteCollectionT type exposes the following members.
| Name | Description | |
|---|---|---|
| AutoId | Get collection auto id type | |
| EntityMapper | Getting entity mapper from current collection. Returns null if collection are BsonDocument type | |
| Name | Get collection name |
| Name | Description | |
|---|---|---|
| Count | Get document count in collection | |
| Count(BsonExpression) | Get document count in collection using predicate filter expression | |
| Count(ExpressionFuncT, Boolean) | Count documents matching a query. This method does not deserialize any documents. Needs indexes on query expression | |
| Count(Query) | Get document count in collection using predicate filter expression | |
| Count(String, BsonDocument) | Get document count in collection using predicate filter expression | |
| Count(String, BsonValue) | Get document count in collection using predicate filter expression | |
| Delete | Delete a single document on collection based on _id index. Returns true if document was deleted | |
| DeleteAll | Delete all documents inside collection. Returns how many documents was deleted. Run inside current transaction | |
| DeleteMany(BsonExpression) | Delete all documents based on predicate expression. Returns how many documents was deleted | |
| DeleteMany(ExpressionFuncT, Boolean) | Delete all documents based on predicate expression. Returns how many documents was deleted | |
| DeleteMany(String, BsonDocument) | Delete all documents based on predicate expression. Returns how many documents was deleted | |
| DeleteMany(String, BsonValue) | Delete all documents based on predicate expression. Returns how many documents was deleted | |
| DropIndex | Drop index and release slot for another index | |
| EnsureIndex(BsonExpression, Boolean) | 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 | |
| EnsureIndex(String, BsonExpression, Boolean) | 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 | |
| EnsureIndexK(ExpressionFuncT, K, Boolean) | Create a new permanent index in all documents inside this collections if index not exists already. | |
| EnsureIndexK(String, ExpressionFuncT, K, Boolean) | Create a new permanent index in all documents inside this collections if index not exists already. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Exists(BsonExpression) | Get true if collection contains at least 1 document that satisfies the predicate expression | |
| Exists(ExpressionFuncT, Boolean) | Get true if collection contains at least 1 document that satisfies the predicate expression | |
| Exists(Query) | Get true if collection contains at least 1 document that satisfies the predicate expression | |
| Exists(String, BsonDocument) | Get true if collection contains at least 1 document that satisfies the predicate expression | |
| Exists(String, BsonValue) | Get true if collection contains at least 1 document that satisfies the predicate expression | |
| Find(BsonExpression, Int32, Int32) | Find documents inside a collection using predicate expression. | |
| Find(ExpressionFuncT, Boolean, Int32, Int32) | Find documents inside a collection using predicate expression. | |
| Find(Query, Int32, Int32) | Find documents inside a collection using query definition. | |
| FindAll | Returns all documents inside collection order by _id index. | |
| FindById | Find a document using Document Id. Returns null if not found. | |
| FindOne(BsonExpression) | Find the first document using predicate expression. Returns null if not found | |
| FindOne(ExpressionFuncT, Boolean) | Find the first document using predicate expression. Returns null if not found | |
| FindOne(Query) | Find the first document using defined query structure. Returns null if not found | |
| FindOne(BsonExpression, BsonValue) | Find the first document using predicate expression. Returns null if not found | |
| FindOne(String, BsonDocument) | Find the first document using predicate expression. Returns null if not found | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Include(BsonExpression) | Run an include action in each document returned by Find(), FindById(), FindOne() and All() methods to load DbRef documents Returns a new Collection with this action included | |
| IncludeK(ExpressionFuncT, K) | Run an include action in each document returned by Find(), FindById(), FindOne() and All() methods to load DbRef documents Returns a new Collection with this action included | |
| Insert(IEnumerableT) | Insert an array of new documents to this collection. Document Id must be a new value in collection. Can be set buffer size to commit at each N documents | |
| Insert(T) | Insert a new entity to this collection. Document Id must be a new value in collection - Returns document Id | |
| Insert(BsonValue, T) | Insert a new document to this collection using passed id value. | |
| InsertBulk |
Implements bulk insert documents in a collection. Usefull when need lots of documents.
Obsolete | |
| LongCount | Get document count in collection | |
| LongCount(BsonExpression) | Get document count in collection using predicate filter expression | |
| LongCount(ExpressionFuncT, Boolean) | Get document count in collection using predicate filter expression | |
| LongCount(Query) | Get document count in collection using predicate filter expression | |
| LongCount(String, BsonDocument) | Get document count in collection using predicate filter expression | |
| LongCount(String, BsonValue) | Get document count in collection using predicate filter expression | |
| Max | Returns the max _id index key value | |
| Max(BsonExpression) | Returns the max value from specified key value in collection | |
| MaxK(ExpressionFuncT, K) | Returns the last/max field using a linq expression | |
| Min | Returns the min value of _id index | |
| Min(BsonExpression) | Returns the min value from specified key value in collection | |
| MinK(ExpressionFuncT, K) | Returns the min value from specified key value in collection | |
| Query | Return a new LiteQueryable to build more complex queries | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| Update(IEnumerableT) | Update all documents | |
| Update(T) | Update a document in this collection. Returns false if not found document in collection | |
| Update(BsonValue, T) | Update a document in this collection. Returns false if not found document in collection | |
| UpdateMany(BsonExpression, BsonExpression) | Update many documents based on transform expression. This expression must return a new document that will be replaced over current document (according with predicate). Eg: col.UpdateMany("{ Name: UPPER($.Name), Age }", "_id > 0") | |
| UpdateMany(ExpressionFuncT, T, ExpressionFuncT, Boolean) | Update many document based on merge current document with extend expression. Use your class with initializers. Eg: col.UpdateMany(x => new Customer { Name = x.Name.ToUpper(), Salary: 100 }, x => x.Name == "John") | |
| Upsert(IEnumerableT) | Insert or Update all documents | |
| Upsert(T) | Insert or Update a document in this collection. | |
| Upsert(BsonValue, T) | Insert or Update a document in this collection. |
| Name | Description | |
|---|---|---|
| MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx) | |
| PropertyGet |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertyGetT |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx) |