C# Class NSoft.NFramework.Data.NHibernateEx.UnitOfWork

Utility class for Unit Of Work
Afficher le fichier Open project: debop/NFramework Class Usage Examples

Méthodes publiques

Méthode Description
DisposeUnitOfWork ( IUnitOfWorkImplementor unitOfWork ) : void

called internally to clear the current Unit Of Work and move to the previous one.

DisposeUnitOfWorkFactory ( ) : void

여러 Database에 작업 시 기존 UnitOfWorkFactory를 초기화 해줍니다.

EndLongConversation ( ) : void

Long conversation 을 종료시킵니다.

GetCurrentSessionFor ( Type typeOfEntity ) : ISession

지정된 Entity 형식이 매핑된 현재 Session을 반환한다.

GetCurrentSessionFor ( string name ) : ISession

지정된 Session factory name으로 부터 현재 세션 객체를 가져온다.

RegisterGlobalUnitOfWork ( IUnitOfWork global ) : IDisposable

NOT Thread-safe!!! using 구문을 이용하여 작업을 처리할 때 편리하도록 제공한다.

SetCurrentSession ( Type typeOfEntity, ISession session ) : void

지정된 Entity 형식을 해당 Session에 매핑시킨다.

SetCurrentSessionName ( string name ) : IDisposable

지정된 session factory name을 사용하는 session을 current session으로 설정한다.

Start ( ) : IUnitOfWork

새로운 Unit Of Work을 시작합니다.

Start ( IDbConnection connection ) : IUnitOfWork

새로운 Unit Of Work을 시작합니다.

Start ( IDbConnection connection, UnitOfWorkNestingOptions nestingOptions ) : IUnitOfWork

새로운 Unit Of Work을 시작합니다.

Start ( UnitOfWorkNestingOptions nestingOptions ) : IUnitOfWork

새로운 Unit Of Work을 시작합니다.

StartLongConversation ( ) : void

ASP.NET Session을 이용하여 다중 Page Request에 대해 Transaction이 가능하도록 합니다. 단 실제 Database Transaction과는 달리 Session을 닫지 않는 다는 뜻입니다.

StartPrivateConversation ( ) : System.Guid

Signals the start of an application/user transaction that spans multiple page requests, but is not loaded without explicitly specifying the conversation key.

Used in conjunction with UnitOfWorkHttpApplication, will ensure that the current UoW (see Current) is kept intact across multiple page requests. Review the LongConversationManager for details.

Note: This method does not start a physical database transaction.

Stop ( ) : void

현재 실행중인 UnitOfWork를 끝냅니다.

Stop ( bool needFlushing ) : void

현재 실행중인 UnitOfWork를 끝냅니다.

Method Details

DisposeUnitOfWork() public static méthode

called internally to clear the current Unit Of Work and move to the previous one.
public static DisposeUnitOfWork ( IUnitOfWorkImplementor unitOfWork ) : void
unitOfWork IUnitOfWorkImplementor
Résultat void

DisposeUnitOfWorkFactory() public static méthode

여러 Database에 작업 시 기존 UnitOfWorkFactory를 초기화 해줍니다.
public static DisposeUnitOfWorkFactory ( ) : void
Résultat void

EndLongConversation() public static méthode

Long conversation 을 종료시킵니다.
public static EndLongConversation ( ) : void
Résultat void

GetCurrentSessionFor() public static méthode

지정된 Entity 형식이 매핑된 현재 Session을 반환한다.
public static GetCurrentSessionFor ( Type typeOfEntity ) : ISession
typeOfEntity System.Type
Résultat ISession

GetCurrentSessionFor() public static méthode

지정된 Session factory name으로 부터 현재 세션 객체를 가져온다.
public static GetCurrentSessionFor ( string name ) : ISession
name string Factory name
Résultat ISession

RegisterGlobalUnitOfWork() public static méthode

NOT Thread-safe!!! using 구문을 이용하여 작업을 처리할 때 편리하도록 제공한다.
public static RegisterGlobalUnitOfWork ( IUnitOfWork global ) : IDisposable
global IUnitOfWork
Résultat IDisposable

SetCurrentSession() public static méthode

지정된 Entity 형식을 해당 Session에 매핑시킨다.
public static SetCurrentSession ( Type typeOfEntity, ISession session ) : void
typeOfEntity System.Type
session ISession
Résultat void

SetCurrentSessionName() public static méthode

지정된 session factory name을 사용하는 session을 current session으로 설정한다.
public static SetCurrentSessionName ( string name ) : IDisposable
name string
Résultat IDisposable

Start() public static méthode

새로운 Unit Of Work을 시작합니다.
public static Start ( ) : IUnitOfWork
Résultat IUnitOfWork

Start() public static méthode

새로운 Unit Of Work을 시작합니다.
public static Start ( IDbConnection connection ) : IUnitOfWork
connection IDbConnection
Résultat IUnitOfWork

Start() public static méthode

새로운 Unit Of Work을 시작합니다.
public static Start ( IDbConnection connection, UnitOfWorkNestingOptions nestingOptions ) : IUnitOfWork
connection IDbConnection
nestingOptions UnitOfWorkNestingOptions
Résultat IUnitOfWork

Start() public static méthode

새로운 Unit Of Work을 시작합니다.
public static Start ( UnitOfWorkNestingOptions nestingOptions ) : IUnitOfWork
nestingOptions UnitOfWorkNestingOptions
Résultat IUnitOfWork

StartLongConversation() public static méthode

ASP.NET Session을 이용하여 다중 Page Request에 대해 Transaction이 가능하도록 합니다. 단 실제 Database Transaction과는 달리 Session을 닫지 않는 다는 뜻입니다.
public static StartLongConversation ( ) : void
Résultat void

StartPrivateConversation() public static méthode

Signals the start of an application/user transaction that spans multiple page requests, but is not loaded without explicitly specifying the conversation key.
Used in conjunction with UnitOfWorkHttpApplication, will ensure that the current UoW (see Current) is kept intact across multiple page requests. Review the LongConversationManager for details.

Note: This method does not start a physical database transaction.

public static StartPrivateConversation ( ) : System.Guid
Résultat System.Guid

Stop() public static méthode

현재 실행중인 UnitOfWork를 끝냅니다.
public static Stop ( ) : void
Résultat void

Stop() public static méthode

현재 실행중인 UnitOfWork를 끝냅니다.
public static Stop ( bool needFlushing ) : void
needFlushing bool Session에 보관된 내용을 Flushing을 할 것인지 여부
Résultat void