Mindscape LightSpeed - User Reference & API Documentation
Repository Class
API ReferenceMindscape.LightSpeedRepository
Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.
Declaration Syntax
C#Visual Basic
public static class Repository
Public NotInheritable Class Repository
Members
All MembersMethods



IconMemberDescription
Add(Entity)
Adds the specified entity to the Repository.

Attach(Entity)
Attaches the specified entity to the current IUnitOfWork.

BeginTransaction()()()
Begins a transaction against the underlying database.

BeginTransaction(IsolationLevel)
Begins a transaction against the underlying database.

BeginUnitOfWork()()()
Begins a new IUnitOfWork. LightSpeed automatically creates the first IUnitOfWork for a given request scope. Only call this method if you need a new nested IUnitOfWork in the same request scope.

CompleteUnitOfWork()()()
Completes the current IUnitOfWork saving all pending changes.

CompleteUnitOfWork(Boolean)
Completes the current IUnitOfWork and optionally saves all changes to the underlying database.

Count<(Of <(TEntity>)>)()()()
Returns the number of entities of a specified Type.

Count<(Of <(TEntity>)>)(Query)
Returns the number of entities of a specified type based on the supplied Type and Query.

Count(Query)
Returns the number of entities in the repository based on the supplied Query.

Find<(Of <(TEntity>)>)()()()
Finds all entities of a given type.

Find(Type)
Finds a collection of entities based on a type of entity.

Find<(Of <(TEntity>)>)(QueryExpression)
Finds a collection of entities that match the provided QueryExpression.

Find(Type, QueryExpression)
Finds a collection of entities that satisfy the supplied QueryExpression.

Find<(Of <(TEntity>)>)(QueryExpression, Order, Page)
Finds a collection of Entities that satisfy the supplied criteria.

Find(Type, QueryExpression, Order, Page)
Finds a collection of Entities that satisfy the supplied criteria.

Find<(Of <(TEntity>)>)(Query)
Finds a collection of Entities that satisfy the specified Query.

Find(Query)
Finds a collection of Entities that satisfy the specified Query.

Find<(Of <(TList>)>)(Query, TList)
Returns a list of Entity objects that match the provided Query specification. Places the results into the provided collection.

FindOne<(Of <(TEntity>)>)(Object)
Finds a single Entity by it's id.

FindOne(Type, Object)
Finds a single Entity by it's id.

FindOne<(Of <(TEntity>)>)(QueryExpression)
Finds a single Entity that satisifies the provided QueryExpression.

FindOne(Type, QueryExpression)
Finds a single Entity that satisifies the provided QueryExpression.

FindOne<(Of <(TEntity>)>)(Query)
Finds a single entity that that satisfies the specified Query.

FindOne(Query)
Finds a single entity that that satisfies the specified Query.

Project(Query)
Returns an IDataReader containing the results of the specified projection query. A projection query returns only a subset of fields of an entity. At lease one field name must have been added to the Projection collection.

Remove(Entity)
Removes the specified entity from the Repository.

SaveChanges()()()
Flushes pending changes to the underlying database.

SaveChanges(Boolean)
Flushes pending changes to the underlying database optionally specifying whether the current IUnitOfWork should be reset.

Inheritance Hierarchy
Object
Repository

Assembly: Mindscape.LightSpeed (Module: Mindscape.LightSpeed) Version: 1.2.1393.0 (1.2.1393.0)