C# Class Infrastructure.Data.EntityFramework.Lab.SimpleDbContextStorage

Inheritance: IDbContextStorage
Afficher le fichier Open project: huyrua/efprs Class Usage Examples

Méthodes publiques

Méthode Description
GetAllDbContexts ( ) : IEnumerable

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

GetDbContextForKey ( string key ) : DbContext

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

SetDbContextForKey ( string key, DbContext context ) : void

Stores the db 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.

SimpleDbContextStorage ( ) : System

Initializes a new instance of the SimpleDbContextStorage class.

Method Details

GetAllDbContexts() public méthode

Returns all the values of the internal dictionary of db contexts.
public GetAllDbContexts ( ) : IEnumerable
Résultat IEnumerable

GetDbContextForKey() public méthode

Returns the db context associated with the specified key or null if the specified key is not found.
public GetDbContextForKey ( string key ) : DbContext
key string The key.
Résultat DbContext

SetDbContextForKey() public méthode

Stores the db 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 SetDbContextForKey ( string key, DbContext context ) : void
key string The key.
context DbContext
Résultat void

SimpleDbContextStorage() public méthode

Initializes a new instance of the SimpleDbContextStorage class.
public SimpleDbContextStorage ( ) : System
Résultat System