Link Search Menu Expand Document

Documentations

Navigate the RepoDB documentation.


Get Started

Feature/ClassDescription
SQL ServerLearn on how to work with SQL Server databases using RepoDB library.
OracleLearn on how to work with Oracle databases using RepoDB library.
PostgreSQLLearn on how to work with PostgreSQL databases using RepoDB library.
MySQLLearn on how to work with MySQL databases using RepoDB library.
Db2Learn on how to work with IBM Db2 databases using RepoDB library.
SQLiteLearn on how to work with SQLite databases using RepoDB library.
TelemetryLearn on how to start capturing and publishing RepoDB operation telemetry using RepoDb.Telemetry.Default.

Features

Feature/ClassDescription
Batch OperationsIt is the process of making the multiple single-operations be executed against the database in one-go.
Bulk OperationsIt is the process of bringing all the data from the application into the database server at once, and at the same time, ignoring some database specific activities behind the scene. Thus gives you maximum performance during the operation.
CachingIn general terms, a Cache is a component that stores an object (or its states) in any form of temporary storage that is accessible for future used. The object that is being stored can be a result of computational, operational, inputs/outputs or analytical operations and calculations.
Class HandlersThis is a feature that would allow you to handle the event during the serialization/deserialization process of the Model and the DbDataReader object (inbound/outbound).
Class MappingThis is a feature that would allow you to map the .NET CLR type (or class properties) into its equivalent database objects and types.
Connection PersistencyThis is a feature that enables you to manage the instance of the database connection object within the repository objects.
DynamicsThis feature allows you to work with RepoDB by maximizing the usage of dynamics.
EnumerationThis is a feature that enables you to work with enumerations within the class objects.
Expression TreesThis is a feature that would allow you to compose a conditional expressions (to filter a data) when doing an operation in the database.
HintsThis is a feature that would allow you to optimize the command executions towards the database. It is a keyword that is usually being added into the SQL statements (DML) to further optimize the execution of your commands.
Implicit MappingThis is a feature that would allow you to implicitly map the .NET CLR objects or class properties into its equivalent object in the database. Certain mapper classes has been provided in order to avoid the usage of the attributes in the classes.
Multiple QueryThis is a feature that would allow you to fetch multiple resultsets in a single call.
Property HandlersThis is a feature that would allow you to handle the tranformation of the class properties and database columns (inbound/outbound).
RepositoriesA repository is a software design pattern and practice in which it is being implemented as an additional layer between your application and your database. It is being represented as a class object within the application. Through repository, you are managing how the data is being manipulated from/to the database.
Targeted OperationsThis feature allows you to make a targeted invocation when executing the operations againts the database.
TelemetryA feature that captures per-operation execution telemetry (SQL statement, elapsed time, session, client, source assembly) via an ITrace-based pipeline and publishes it to an insights collector.
TracingThis is a feature that would allow you to log, audit and debug the command execution context (i.e.: SQL Statement, Parameters, Elapsed Time) via TraceLog class.
TransactionA process of making the executions more ACID in nature.
Type MappingThis is a feature that would allow you to map the .NET CLR type into its equivalent database type.

Operations

Feature/ClassDescription
AverageThis method computes the average value of the target field.
AverageAllThis method computes the average value of the target field across all rows.
BatchQueryThis method queries rows from the database in batches.
BulkDeleteThis method deletes rows from the database in bulk. It is supported for SQL Server and Oracle. Oracle also has a dedicated BulkDeleteByKey operation for deleting by primary key.
BulkInsertThis method inserts all rows from the client application into the database in bulk. It is supported for SQL Server and Oracle.
BulkMergeThis method merges all rows from the client application into the database in bulk. It is supported for SQL Server and Oracle.
BulkUpdateThis method updates all rows from the client application in the database in bulk. It is supported for SQL Server and Oracle.
CountThis method counts the number of rows in a table.
CountAllThis method counts all rows in a table.
DeleteThis method deletes rows from a table.
DeleteAllThis method deletes all rows, or a specified set of rows by primary key, from a table.
ExecuteNonQueryThis method executes a raw SQL statement directly against the database and returns the number of rows affected. It supports all RDBMS data providers.
ExecuteQueryThis method executes a raw SQL statement directly against the database and returns an IEnumerable object. It supports all RDBMS data providers.
ExecuteQueryMultipleThis method executes multiple raw SQL statements against the database in a single round-trip and returns a QueryMultipleExtractor object. It supports all RDBMS data providers.
ExecuteReaderThis method executes a raw SQL statement directly against the database and returns a DbDataReader object. It supports all RDBMS data providers.
ExecuteScalarThis method executes a raw SQL statement directly against the database and returns the value of the first column of the first row from the result set. It supports all RDBMS data providers.
ExistsThis method checks whether matching rows exist in a table.
InsertThis method inserts a data entity object as a new row in the table.
InsertAllThis method inserts multiple data entity objects as new rows in the table.
MaxThis method computes the maximum value of the target field.
MaxAllThis method computes the maximum value of the target field across all rows.
MergeThis method inserts a new row or updates an existing row in the table. It operates as an UPSERT and does not perform any deletion.
MergeAllThis method inserts multiple data entity objects as new rows or updates existing rows in the table. It operates as an UPSERT and does not perform any deletion.
MinThis method computes the minimum value of the target field.
MinAllThis method computes the minimum value of the target field across all rows.
QueryThis method queries rows from a table.
QueryAllThis method queries all rows from a table.
QueryMultipleThis method queries data as multiple result sets from the table based on the given target types.
SumThis method computes the sum of the target field.
SumAllThis method computes the sum of the target field across all rows.
TruncateThis method truncates a table in the database.
UpdateUpdates an existing row in the table.
UpdateAllUpdates multiple existing rows in the table in a single call.

Classes

Feature/ClassDescription
BaseDbSettingA base class for all the database setting classes.
BaseRepositoryA base class that is being used to implement an entity-based repositories.
BaseStatementBuilderA base class for all the statement builder classes.
BulkInsertMapItemA mapping class that is being used for bulk insert operation.
CacheItemA class that is used as an item for the cache object.
CancellableTraceLogA class that is being used to cancel the current trace operation.
ClassExpressionA helper class to extract class properties and values.
ClassPropertyA container class that holds an instance of property object. It also contains all the necesarry methods that is relevant to the current property object.
ConstantA constant class that is being used by the library.
ConverterA converter class that is being used to convert an object into a specific type within the library.
DataEntityDataReaderA customized data reader class that is being used to handle the list of data entity objects.
DataReader (Compiled)The most fastest data reader extractor in .NET. It is used to extract the content of the data reader object and map it into a class object.
DbFieldA class that contains the necessary properties that defines a database field.
DbRepositoryA base class that is being used to implement a repository object. This is very useful if you would like to develop a shared or database level repository.
DirectionalQueryFieldA class that is being used to define a query expression for the SQL statement that is bi-directional.
EntityMapFluentDefinitionA class that is being used to define a data entity level mappings (i.e.: Table, Column, Primary, Identity, DB Type and Class/Property Handler).
FieldA class that defines a context of field object.
FunctionalQueryFieldA query field class that is being used to define a functional query expression for the SQL statement that is useful for customizations.
GlobalConfigurationA class that is being used to define the globalized configurations for the library.
LeftQueryFieldA query field class that is being used to define a query expression for the SQL statement using the LEFT function.
LeftTrimQueryFieldA query field class that is being used to define a query expression for the SQL statement using the LTRIM function.
LenQueryFieldA query field class that is being used to define a query expression for the SQL statement using the LEN function.
LengthQueryFieldA query field class that is being used to define a query expression for the SQL statement using the LENGTH function.
LowerQueryFieldA query field class that is being used to define a query expression for the SQL statement using the LOWER function.
MemoryCacheAn advance class that is being used to cache an object into a memory within the library.
OracleBulkInsertMapItemA mapping class used to define a column mapping, with an optional explicit OracleDbType, for the Oracle bulk operations.
OrderFieldA class that is being used to define an ordering of the results when querying a data from the database.
ParameterA class that defines a parameter of the data command object.
PostgreSqlBulkInsertMapItemA mapping class used to define a column mapping, with an optional explicit NpgsqlDbType or data type name, for the PostgreSQL bulk operations.
PropertyValueA class that holds the value of class or data entity property and its values.
QueryBuilderAn advance fluent class that is being used to construct a SQL statements all throughout the library.
QueryFieldA class that is being used to define a query expression for the SQL statement. You can define the name, operation and the value of the target expression.
QueryGroupA class that is being used to group a list of query expressions for the SQL statement. You can define the conjunction to be used during the multiple query expressions.
QueryMultipleExtractorA class that is being used to extract the information of the multiple resultsets returned by the ExecuteQueryMultiple operation.
ResultTraceLogA class that handles the result of the trace operation.
RightQueryFieldA query field class that is being used to define a query expression for the SQL statement using the RIGHT function.
RightTrimQueryFieldA query field class that is being used to define a query expression for the SQL statement using the RTRIM function.
SqlServerBulkInsertMapItemA mapping class used to define a column mapping for the SQL Server bulk operations.
SqlServerTableHintsA class that contains all the SQL Server table optimizers.
TraceLogA class that contains all the information of the trace.
TrimQueryFieldA query field class that is being used to define a query expression for the SQL statement using the TRIM function.
TypeMapFluentDefinitionA class that is being used to define a type-level mappings (i.e.: DB Type and Property Handler).
UpperQueryFieldA query field class that is being used to define a query expression for the SQL statement using the UPPER function.

Attributes

Feature/ClassDescription
ArrayLength (Db2)This attribute sets the DB2Parameter.ArrayLength property value via a class property.
CompareInfo (SQL Server)This attribute sets the SqlParameter.CompareInfo property value via a class property.
ConvertedValue (PostgreSQL)This attribute sets the NpgsqlParameter.ConvertedValue property value via a class property.
DataTypeName (PostgreSQL)This attribute sets the NpgsqlParameter.DataTypeName property value via a class property.
Db2Type (Db2)This attribute sets the DB2Parameter.DB2Type property value via a class property.
Db2TypeOutput (Db2)This attribute sets the DB2Parameter.DB2TypeOutput property value via a class property.
DbTypeThis attribute sets the DbParameter.DbType property value via a class property.
DirectionThis attribute sets the DbParameter.Direction property value via a class property.
ForceColumnEncryption (SQL Server)This attribute sets the SqlParameter.ForceColumnEncryption property value via a class property.
IdentityMarks a class property as the identity column of the database table.
IsDefault (Db2)This attribute sets the DB2Parameter.IsDefault property value via a class property.
IsNullableThis attribute sets the DbParameter.IsNullable property value via a class property.
IsUnassigned (Db2)This attribute sets the DB2Parameter.IsUnassigned property value via a class property.
LocaleId (SQL Server)This attribute sets the SqlParameter.LocaleId property value via a class property.
MapMaps a class or class property into its equivalent database object (table, view, or column) name.
MySqlDbType (MySql.Data)This attribute sets the MySqlParameter.MySqlDbType property value via a class property.
MySqlDbType (MySqlConnector)This attribute sets the MySqlParameter.MySqlDbType property value via a class property.
NameThis attribute sets the DbParameter.Name property value via a class property.
NpgsqlDbType (PostgreSQL)This attribute sets the NpgsqlParameter.NpgsqlDbType property value via a class property.
Offset (SQL Server)This attribute sets the SqlParameter.Offset property value via a class property.
PrecisionThis attribute sets the DbParameter.Precision property value via a class property.
PrimaryMarks a class property as the primary key of the database table.
PropertyHandlerAttaches a property handler to a class property to transform its value during data extraction and command execution.
PropertyValueAttributeThe base class for all attributes that set properties on a DbParameter object.
ScaleThis attribute sets the DbParameter.Scale property value via a class property.
SizeThis attribute sets the DbParameter.Size property value via a class property.
SourceColumn (Db2)This attribute sets the DB2Parameter.SourceColumn property value via a class property.
SourceColumnNullMapping (Db2)This attribute sets the DB2Parameter.SourceColumnNullMapping property value via a class property.
SourceVersion (Db2)This attribute sets the DB2Parameter.SourceVersion property value via a class property.
SqlDbType (SQL Server)This attribute sets the SqlParameter.SqlDbType property value via a class property.
SqliteType (SQLite)This attribute sets the SqliteParameter.SqliteType property value via a class property.
TypeMapMaps a class property into a specific database type (e.g. DbType).
TypeName (SQL Server)This attribute sets the SqlParameter.TypeName property value via a class property.
UdtTypeName (SQL Server)This attribute sets the SqlParameter.UdtTypeName property value via a class property.
XmlSchemaCollectionDatabase (SQL Server)This attribute sets the SqlParameter.XmlSchemaCollectionDatabase property value via a class property.
XmlSchemaCollectionName (SQL Server)This attribute sets the SqlParameter.XmlSchemaCollectionName property value via a class property.
XmlSchemaCollectionOwningSchema (SQL Server)This attribute sets the SqlParameter.XmlSchemaCollectionOwningSchema property value via a class property.

Enumerations

Feature/ClassDescription
ConjunctionA enumeration that defines the conjunctions to be used when composing a query expression.
ConnectionPersistencyA enumeration that defines the persistency of the database connection object when working with repository.
ConversionTypeA enumeration that defines the type of conversion to be used when extracting a data from/to the database.
KeyColumnReturnBehaviorA enumeration that defines the type of conversion to be used when extracting a data from/to the database.
OperationA enumeration that defines the different operations that can be used when composing a query expression.
OrderA enumeration that defines the list of ordering when querying a data from the database.
PostgreSqlBulkImportIdentityBehaviorAn enumeration that is being used to define the behavior of the identity property/column when an entity is being bulk-imported towards the target table.
PostgreSqlBulkImportMergeCommandTypeA enumeration that is being used to define the command text to use when executing the BulkMerge operation.
PostgreSqlBulkImportPseudoTableTypeAn enumeration that is being used to define the type of pseudo-temporary table to be created during the bulk-import operations.

Interfaces

Feature/ClassDescription
ICacheThis interface is used to mark a class to be a cache object. It gives you the full control on the implementations of your own cache object (i.e.: File Caching, SqLite Caching, XML Caching, Memory Caching, etc).
IDbHelperThis interface is used to mark a class to be a database helper object. It is very useful if you would like optimize and override the default implementation of the library (i.e.: retrieving the list of fields, retrieving newly generated identity).
IDbSettingThis interface is used to mark a class to be a database setting object. It allows you to control the behavior of the library on a specific RDBMS data provider based on the value you provided on the properties this class.
IExpirableThis interface is used to make a class expirable in a contextual point of view. Is is used by CacheItem class.
IPropertyHandlerThis interface marks a class as a property handler. It exposes TInput and TResult generic type parameters used by both the Get() and Set() methods.
IResolverThis interface is used to mark a class to be a resolver object. This interface accepts upto the maximum 7 input generic types and 1 output generic type.
IStatementBuilderThis interface is used to mark a class to be a statement builder object. I provides necessary methods for your to be able to override the way how the SQL statements are being constructed.
ITraceThis interface is used to mark a class to be a trace object.

Cachers

Feature/ClassDescription
ClassMappedNameCacheA class that is being used to retrieve the cached name of the class or data entity.
CommandTextCacheA class that is being used to retrieve the cached command texts within RepoDB library.
DbFieldCacheA class that is being used to retrieve the cached database fields of the class or data entity.
FieldCacheA class that is being used to retrieve the cached fields or properties of the class or data entity.
IdentityCacheA class that is being used to retrieve the cached identity field of the class or data entity.
PrimaryCacheA class that is being used to retrieve the cached primary field of the class or data entity.
PropertyCacheA class that is being used to retrieve the cached properties of the class or data entity.
PropertyHandlerCacheA class that is being used to retrieve the cached property handler of the class or data entity property.
PropertyMappedNameCacheA class that is being used to retrieve the cached name of the class or data entity property.
PropertyValueAttributeCacheA class that is being used to retrieve the cached attributes of the property.
TypeMapCacheA class that is being used to retrieve the cached mapped database type of the class or data entity property.

Mappers

Feature/ClassDescription
ClassMapperA mapper class that is being used to map the class into its equivalent object in the database (i.e.: Table, View). This class is used as an alternative to Map attribute.
ClassHandlerMapperA class that is being used to map a class handler into a class. This class is used as an alternative to ClassHandler attribute.
DbHelperMapperA mapper class for all the database helper classes. The mapping can be made based on the type of the target RDBMS data provider.
DbSettingMapperA mapper class for all the database setting classes. The mapping can be made based on the type of the target RDBMS data provider.
FluentMapperA class that is being used to define a mapping for the target data entity in a fluent way.
IdentityMapperA mapper class that is being used to map a class property to be an identity property. This class is used as an alternative to Identity attribute.
PrimaryMapperA mapper class that is being used to map a class property to be primary property. This class is used as an alternative to Primary attribute.
PropertyMapperA mapper class that is being used to map the class property into its equivalent column in the database. This class is used as an alternative to Map attribute.
PropertyHandlerMapperA class that is being used to map a property handler into a .NET CLR type or a class property. This class is used as an alternative to PropertyHandler attribute.
PropertyValueAttributeMapperA mapper class that is being used to map the list PropertyValueAttribute objects into a class property. This class is used as an alternative to the PropertyValueAttribute attributes.
StatementBuilderMapperA mapper class for all the statement builder classes. The mapping can be made based on the type of the target RDBMS data provider.
TypeMapperA class that is being used to map a .NET CLR type or class property into its equivalent database type. This class is used as an alternative to TypeMap attribute.