C# Класс Infrastructure.Data.EntityFramework.Lab.SimpleDbContextStorage

Наследование: IDbContextStorage
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

GetAllDbContexts() публичный Метод

Returns all the values of the internal dictionary of db contexts.
public GetAllDbContexts ( ) : IEnumerable
Результат IEnumerable

GetDbContextForKey() публичный Метод

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.
Результат DbContext

SetDbContextForKey() публичный Метод

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
Результат void

SimpleDbContextStorage() публичный Метод

Initializes a new instance of the SimpleDbContextStorage class.
public SimpleDbContextStorage ( ) : System
Результат System