ILite |
public interface ILiteRepository : IDisposable
The ILiteRepository type exposes the following members.
| Name | Description | |
|---|---|---|
| DeleteT | Delete entity based on _id key | |
| DeleteManyT(BsonExpression, String) | Delete entity based on Query | |
| DeleteManyT(ExpressionFuncT, Boolean, String) | Delete entity based on predicate filter expression | |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable) | |
| EnsureIndexT(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 | |
| EnsureIndexT(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 | |
| EnsureIndexT, K(ExpressionFuncT, K, Boolean, String) | Create a new permanent index in all documents inside this collections if index not exists already. | |
| EnsureIndexT, K(String, ExpressionFuncT, K, Boolean, String) | Create a new permanent index in all documents inside this collections if index not exists already. | |
| FetchT(BsonExpression, String) | Execute Query[T].Where(predicate).ToList(); | |
| FetchT(ExpressionFuncT, Boolean, String) | Execute Query[T].Where(predicate).ToList(); | |
| FirstT(BsonExpression, String) | Execute Query[T].Where(predicate).First(); | |
| FirstT(ExpressionFuncT, Boolean, String) | Execute Query[T].Where(predicate).First(); | |
| FirstOrDefaultT(BsonExpression, String) | Execute Query[T].Where(predicate).FirstOrDefault(); | |
| FirstOrDefaultT(ExpressionFuncT, Boolean, String) | Execute Query[T].Where(predicate).FirstOrDefault(); | |
| InsertT(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 | |
| InsertT(T, String) | Insert a new document into collection. Document Id must be a new value in collection - Returns document Id | |
| QueryT | 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() | |
| SingleT(BsonExpression, String) | Execute Query[T].Where(predicate).Single(); | |
| SingleT(ExpressionFuncT, Boolean, String) | Execute Query[T].Where(predicate).Single(); | |
| SingleByIdT | Search for a single instance of T by Id. Shortcut from Query.SingleById | |
| SingleOrDefaultT(BsonExpression, String) | Execute Query[T].Where(predicate).SingleOrDefault(); | |
| SingleOrDefaultT(ExpressionFuncT, Boolean, String) | Execute Query[T].Where(predicate).SingleOrDefault(); | |
| UpdateT(IEnumerableT, String) | Update all documents | |
| UpdateT(T, String) | Update a document into collection. Returns false if not found document in collection | |
| UpsertT(IEnumerableT, String) | Insert or Update all documents based on _id key. Returns entity count that was inserted | |
| UpsertT(T, String) | Insert or Update a document based on _id key. Returns true if insert entity or false if update entity |