C# Class Uniform.Mongodb.MongodbCollection

Inheritance: IDocumentCollection
ファイルを表示 Open project: paralect/uniform

Public Methods

Method Description
Delete ( String key ) : void

Deletes document with specified key. If document with such key doesn't exists - no changes to collection will be made.

DropAndPrepare ( ) : void
GetById ( IEnumerable keys ) : IEnumerable
GetById ( String key ) : Object

Returns document by it's key. If document doesn't exists - default(TDocument) will be returned.

MongodbCollection ( MongodbDatabase database, Type documentType, String collectionName ) : System
Replace ( String key, object document ) : bool
Save ( String key, Object document ) : bool

Saves document to collection using specified key. If document with such key already exists, it will be silently overwritten.

Save ( object obj ) : bool
Save ( IEnumerable docs ) : void

Method Details

Delete() public method

Deletes document with specified key. If document with such key doesn't exists - no changes to collection will be made.
public Delete ( String key ) : void
key String
return void

DropAndPrepare() public method

public DropAndPrepare ( ) : void
return void

GetById() public method

public GetById ( IEnumerable keys ) : IEnumerable
keys IEnumerable
return IEnumerable

GetById() public method

Returns document by it's key. If document doesn't exists - default(TDocument) will be returned.
public GetById ( String key ) : Object
key String
return Object

MongodbCollection() public method

public MongodbCollection ( MongodbDatabase database, Type documentType, String collectionName ) : System
database MongodbDatabase
documentType System.Type
collectionName String
return System

Replace() public method

public Replace ( String key, object document ) : bool
key String
document object
return bool

Save() public method

Saves document to collection using specified key. If document with such key already exists, it will be silently overwritten.
public Save ( String key, Object document ) : bool
key String
document Object
return bool

Save() public method

public Save ( object obj ) : bool
obj object
return bool

Save() public method

public Save ( IEnumerable docs ) : void
docs IEnumerable
return void