C# Class Infrastructure.Data.EntityFramework.SimpleObjectContextStorage

Simple object context storage implementation
Inheritance: IObjectContextStorage
ファイルを表示 Open project: huyrua/efprs Class Usage Examples

Public Methods

Method Description
GetAllObjectContexts ( ) : IEnumerable

Returns all the values of the internal dictionary of object contexts.

GetObjectContextForKey ( string key ) : ObjectContext

Returns the object context associated with the specified key or null if the specified key is not found.

SetObjectContextForKey ( string key, ObjectContext objectContext ) : void

Stores the object context into a dictionary using the specified key. If an object context already exists by the specified key, it gets overwritten by the new object context passed in.

SimpleObjectContextStorage ( ) : System

Initializes a new instance of the SimpleObjectContextStorage class.

Method Details

GetAllObjectContexts() public method

Returns all the values of the internal dictionary of object contexts.
public GetAllObjectContexts ( ) : IEnumerable
return IEnumerable

GetObjectContextForKey() public method

Returns the object context associated with the specified key or null if the specified key is not found.
public GetObjectContextForKey ( string key ) : ObjectContext
key string The key.
return ObjectContext

SetObjectContextForKey() public method

Stores the object context into a dictionary using the specified key. If an object context already exists by the specified key, it gets overwritten by the new object context passed in.
public SetObjectContextForKey ( string key, ObjectContext objectContext ) : void
key string The key.
objectContext ObjectContext The object context.
return void

SimpleObjectContextStorage() public method

Initializes a new instance of the SimpleObjectContextStorage class.
public SimpleObjectContextStorage ( ) : System
return System