MongoRepository(T, TKey).GetById Method (ObjectId)

MongoRepository

MongoRepositoryT, TKeyGetById Method (ObjectId)
Returns the T by its given id.

Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
public virtual T GetById(
	ObjectId id
)
Public Overridable Function GetById ( 
	id As ObjectId
) As T
public:
virtual T GetById(
	ObjectId id
)
abstract GetById : 
        id : ObjectId -> 'T 
override GetById : 
        id : ObjectId -> 'T 

Parameters

id
Type: ObjectId
The Id of the entity to retrieve.

Return Value

Type: T
The Entity T.
See Also