MongoServices 0.2.0
A Service/Repository Framework for mongoDB
MongoServices.ReadOnlyService< T > Class Template Reference

The base "Read Only" service. More...

Inheritance diagram for MongoServices.ReadOnlyService< T >:
MongoServices.MongoServicesService< T > MongoServices.IReadOnlyService< T > MongoServices.IMongoServicesService< T > MongoServices.IMongoServicesService< T > MongoServices.ReadWriteService< T >

List of all members.

Public Member Functions

 ReadOnlyService (IReadOnlyRepository< T > readOnlyRepository)
 Constructs a ReadOnlyService based on the readOnlyRepository parameter.
IEnumerable< T > GetAll ()
 Gets a collection of the MongoServicesModels from the IReadOnlyRepository&lt;T&gt;.
GetById (ObjectId id)
 Gets one MongoServicesModel from the IReadOnlyRepository&lt;T&gt;.

Properties

IReadOnlyRepository< T > ReadOnlyRepository [get, set]
 Gets the IReadOnlyRepository&lt;T&gt; that was passed into the constructor.

Detailed Description

template<T>
class MongoServices::ReadOnlyService< T >

The base "Read Only" service.

Template Parameters:
TThe MongoServices model to be used by this service.
Type Constraints
T :MongoServicesModel 

Definition at line 13 of file ReadOnlyService.cs.


Member Function Documentation

template<T >
IEnumerable<T> MongoServices.ReadOnlyService< T >.GetAll ( )

Gets a collection of the MongoServicesModels from the IReadOnlyRepository&lt;T&gt;.

Returns:
An enumerable list of the models.

Implements MongoServices.IReadOnlyService< T >.

Definition at line 40 of file ReadOnlyService.cs.

template<T >
T MongoServices.ReadOnlyService< T >.GetById ( ObjectId  id)

Gets one MongoServicesModel from the IReadOnlyRepository&lt;T&gt;.

Parameters:
idThe "Id" of the MongoServicesModel to be retrieved.
Returns:
The selected MongoServicesModel.

Implements MongoServices.IReadOnlyService< T >.

Definition at line 50 of file ReadOnlyService.cs.

template<T >
MongoServices.ReadOnlyService< T >.ReadOnlyService ( IReadOnlyRepository< T >  readOnlyRepository)

Constructs a ReadOnlyService based on the readOnlyRepository parameter.

Parameters:
readOnlyRepositoryThe IReadOnlyRepository&lt;T&gt; to be used with this service.

Definition at line 28 of file ReadOnlyService.cs.


Property Documentation

template<T >
IReadOnlyRepository<T> MongoServices.ReadOnlyService< T >.ReadOnlyRepository [get, set, protected]

Gets the IReadOnlyRepository&lt;T&gt; that was passed into the constructor.

Definition at line 20 of file ReadOnlyService.cs.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Enumerations Properties