C# Класс MicroLite.Listeners.IdentifierStrategyListener

The implementation of IInsertListener for setting the instance identifier value if IdentifierStrategy.DbGenerated or IdentifierStrategy.Sequence is used.
Наследование: IInsertListener
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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