C# Class MicroLite.Listeners.IdentifierStrategyListener

The implementation of IInsertListener for setting the instance identifier value if IdentifierStrategy.DbGenerated or IdentifierStrategy.Sequence is used.
Inheritance: IInsertListener
Afficher le fichier Open project: TrevorPilley/MicroLite Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AfterInsert() public méthode

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.
Résultat void

BeforeInsert() public méthode

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.
Résultat void