C# 클래스 Infrastructure.Data.EntityFramework.Lab.SimpleDbContextStorage

상속: IDbContextStorage
파일 보기 프로젝트 열기: huyrua/efprs 1 사용 예제들

공개 메소드들

메소드 설명
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