Syntax

C#
[SerializableAttribute]
public abstract class ActiveRecordBase<T>

Type Parameters

T

The type exposes the following members.

Protected Constructors

Public Methods

  NameDescription
Public methodCreateAndFlush
Creates (Saves) a new instance to the database.
(Inherited from ActiveRecordBase.)
Public methodStatic memberDeleteAllOverloaded.
Public methodDeleteAndFlush
Deletes the instance from the database.
(Inherited from ActiveRecordBase.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberExistsOverloaded.
Public methodStatic memberFind
Finds an object instance by an unique ID
Public methodStatic memberFindAllOverloaded.
Public methodStatic memberFindAllByPropertyOverloaded.
Public methodStatic memberFindFirstOverloaded.
Public methodStatic memberFindOneOverloaded.
Public methodGetHashCode
Serves as a hash function for a particular type. GetHashCode()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSaveAndFlush
Saves the instance information to the database. May Create or Update the instance depending on whether it has a valid ID.
(Inherited from ActiveRecordBase.)
Public methodSaveCopyAndFlush
Saves a copy of the instance information to the database. May Create or Update the instance depending on whether it has a valid ID.
(Inherited from ActiveRecordBase.)
Public methodStatic memberSlicedFindAllOverloaded.
Public methodToString
Return the type of the object with its PK value. Useful for logging/debugging
(Inherited from ActiveRecordBase.)
Public methodStatic memberTryFind
Finds an object instance by an unique ID. If the row is not found this method will not throw an exception.
Public methodUpdateAndFlush
Persists the modification on the instance state to the database.
(Inherited from ActiveRecordBase.)

Protected Methods

  NameDescription
Protected methodBeforeDelete
Hook to perform additional tasks before removing the object instance representation from the database.
(Inherited from ActiveRecordHooksBase.)
Protected methodBeforeLoad
Hook to transform the read data from the database before populating the object instance
(Inherited from ActiveRecordHooksBase.)
Protected methodBeforeSave
Hook to change the object state before saving it.
(Inherited from ActiveRecordHooksBase.)
Protected methodStatic memberCountOverloaded.
Protected methodStatic memberCreate
Creates (Saves) a new instance to the database.
Protected methodStatic memberDelete
Deletes the instance from the database.
Protected methodStatic memberExecuteOverloaded.
Protected methodStatic memberExecuteQuery2<(Of <R>)>
Executes the query and return a strongly typed result
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodStatic memberFindByPrimaryKeyOverloaded.
Protected methodFindDirty
Called from Flush(). The return value determines whether the entity is updated
(Inherited from ActiveRecordHooksBase.)
Protected methodIsUnsaved
Called when a transient entity is passed to SaveOrUpdate.
(Inherited from ActiveRecordHooksBase.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnDelete
Lifecycle method invoked during Delete of the entity
(Inherited from ActiveRecordHooksBase.)
Protected methodOnFlushDirty
(Inherited from ActiveRecordHooksBase.)
Protected methodOnLoad
Lifecycle method invoked during Load of the entity
(Inherited from ActiveRecordHooksBase.)
Protected methodOnSave
Lifecycle method invoked during Save of the entity
(Inherited from ActiveRecordHooksBase.)
Protected methodOnUpdate
Lifecycle method invoked during Update of the entity
(Inherited from ActiveRecordHooksBase.)
Protected methodPostFlush
Called after a flush that actually ends in execution of the SQL statements required to synchronize in-memory state with the database.
(Inherited from ActiveRecordHooksBase.)
Protected methodPreFlush
Called before a flush
(Inherited from ActiveRecordHooksBase.)
Protected methodStatic memberRefresh
Refresh the instance from the database.
Protected methodStatic memberSave
Saves the instance to the database. If the primary key is unitialized it creates the instance on the database. Otherwise it updates it.

If the primary key is assigned, then you must invoke Create(T) or Update(T) instead.

Protected methodStatic memberSaveCopy
Saves a copy of the instance to the database. If the primary key is unitialized it creates the instance on the database. Otherwise it updates it.

If the primary key is assigned, then you must invoke Create(T) or Update(T) instead.

Protected methodStatic memberUpdate
Persists the modification on the instance state to the database.

See Also