C# 클래스 MicroLite.Listeners.IdentifierStrategyListener

The implementation of IInsertListener for setting the instance identifier value if IdentifierStrategy.DbGenerated or IdentifierStrategy.Sequence is used.
상속: IInsertListener
파일 보기 프로젝트 열기: TrevorPilley/MicroLite 1 사용 예제들

공개 메소드들

메소드 설명
AfterInsert ( object instance, object executeScalarResult ) : void

Invoked after the SqlQuery to insert the record for the instance has been executed.

BeforeInsert ( object instance ) : void

Invoked before the SqlQuery to insert the record into the database is created.

메소드 상세

AfterInsert() 공개 메소드

Invoked after the SqlQuery to insert the record for the instance has been executed.
Thrown if instance is null or IdentifierStrategy is DbGenerated /// and executeScalarResult is null.
public AfterInsert ( object instance, object executeScalarResult ) : void
instance object The instance which has been inserted.
executeScalarResult object The execute scalar result (the identifier value returned by the database /// or null if the identifier is .Assigned.
리턴 void

BeforeInsert() 공개 메소드

Invoked before the SqlQuery to insert the record into the database is created.
public BeforeInsert ( object instance ) : void
instance object The instance to be inserted.
리턴 void