C# 클래스 NSoft.NFramework.Data.NHibernateEx.UnitOfWork

Utility class for Unit Of Work
파일 보기 프로젝트 열기: debop/NFramework 1 사용 예제들

공개 메소드들

메소드 설명
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를 끝냅니다.

메소드 상세

DisposeUnitOfWork() 공개 정적인 메소드

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

DisposeUnitOfWorkFactory() 공개 정적인 메소드

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

EndLongConversation() 공개 정적인 메소드

Long conversation 을 종료시킵니다.
public static EndLongConversation ( ) : void
리턴 void

GetCurrentSessionFor() 공개 정적인 메소드

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

GetCurrentSessionFor() 공개 정적인 메소드

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

RegisterGlobalUnitOfWork() 공개 정적인 메소드

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

SetCurrentSession() 공개 정적인 메소드

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

SetCurrentSessionName() 공개 정적인 메소드

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

Start() 공개 정적인 메소드

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

Start() 공개 정적인 메소드

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

Start() 공개 정적인 메소드

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

Start() 공개 정적인 메소드

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

StartLongConversation() 공개 정적인 메소드

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

StartPrivateConversation() 공개 정적인 메소드

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
리턴 System.Guid

Stop() 공개 정적인 메소드

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

Stop() 공개 정적인 메소드

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