Serenity.Net.Data assembly

Serenity namespace

signature name description
static class ChainableExtensions Contains method chaining extensions for objects like SQL queries that implement IChainable
interface IChainable Interface for chainable objects, e.g. with functions returning themselves.
interface ICriteria Shared criteria interface
interface ICustomValidator Custom validator abstraction
interface IValidationContext Validation context abstraction

Serenity.Data namespace

signature name description
class Alias Used to define aliases like (T0).
static class AliasExtensions Contains extension methods for Alias objects
abstract class BaseCriteria Base criteria object type
abstract class BaseCriteriaVisitor A visitor implementation for BaseCriteria object trees.
class BinaryCriteria Binary criteria object, which has two operands and a operator.
static class BracketLocator Contains helper methods for locating / replacing brackets in an SQL expression
static class ConnectionExtensions Contains DB connection related extensions
class ConnectionKeyAttribute Determines the connection key used for a class
class ConnectionStringEntry Connection string setting
class ConnectionStringInfo Contains a connection string, its key and provider name.
class ConnectionStringOptions Connection string options
static class ConnectionStringsExtensions Contains connection string extensions
class ConstantCriteria A constant criteria object, which only contains a value expression that would be converted to its string representation in SQL, not a parameterized value.
class Criteria An object that is used to create criterias by employing operator overloading features of C# language, instead of using string based criterias.
enum CriteriaOperator Set of criteria operator types
class CrossApply CROSS APPLY type of join
class DataAuditLogAttribute Indicates that the entity should be audit logged. This feature is only available in premium app.
class DatabaseAliasAttribute Determines database alias, used for unit test database contexts.
class DatabaseCaretReferences Helper class for replacing database caret references in format [^ConnectionKey] in SQL expressions.
static class DataReaderExtensions Extension methods for IDataReader objects.
enum DateParts DateParts type
class DateTimeKindAttribute Determines Time kind for a DateTime field.
class DefaultConnectionStrings Default connection string source
class DefaultSqlConnections Default connection factory
class DefaultSqlDialectMapper Sql Dialect mapper
class DeltaLister<TItem> Helper class to find differences between to lists for updating
[Flags] enum DeltaOptions Delta options flags
class EmitFieldTypeAttribute Declares that the field generated for this template property should be of type specified.
class EmitNameAttribute Declares that the property generated for this template property should have the specified name, instead of the auto generated one.
enum ExpectedRows Expected number of rows enumeration for SQL Update / Delete operation. This enumeration is used to avoid updating/deleting multiple records by mistake when forgot to add a WHERE statement.
[Flags] enum FieldFlags Flags that determine basic properties of a field
static class FilterableQueryExtensions Extensions for objects implementing IDbWhere interface.
class FirebirdDialect Firebird dialect
interface IAlias Interface for table aliases.
interface IConnectionProfiler An interface used to abstract profilers like Mini Profiler.
interface IConnectionString Contains a connection string, its key and provider name.
interface IConnectionStrings Abstraction to access connection strings along with dialect and provider information
class IdPropertyAttribute Determines that the attached property is the ID field of the table.
interface IField Field object abstraction for SQL query
interface IFilterableQuery Interface for query classes (e.g. SqlSelect, SqlUpdate) having a where method to filter records
interface IGetExpressionByName Interface for query classes (e.g. SqlQuery) that can return expression given column name
interface IHasActualConnection Interfaces for types that has an ActualConnection property of type IDbConnection
interface IHasActualTransaction Interfaces for types that has an ActualTransaction property of type IDbTransaction
interface IHasCommandTimeout Interfaces for types that has an CommandTimeout property that determines the default command timeout for that connection
interface IHasConnectionStateChange Interfaces for types that has a connection StateChange event (e.g. connection)
interface IHasCurrentTransaction Interfaces for types that has a CurrentTransaction property of type IDbTransaction
interface IHasDialect Interfaces for types that has a Dialect property of type ISqlDialect
interface IHasLogger Interfaces for types that has an Logger
interface IHasOpenedOnce Interfaces for types that has an OpenedOnce property that determines if the connection has opened at least once
interface IHaveJoins Interface for row type that provides a list of its joins
interface IMustRemoveT0 Obsolete interface
class InnerJoin INNER JOIN type
class InstanceNameAttribute Determines non-plural name for an entity.
interface IQueryWithParams Interface for objects setting parameters by PARAM method (like SqlInsert, SqlUpdate, SqlDelete...)
interface ISetFieldByStatement Interface for objects setting values by SetTo method (like SqlInsert, SqlUpdate...)
interface ISqlConnections An interface used to abstract sql connections
interface ISqlDialect Abstraction for SQL dialect, e.g. syntax for different SQL server types and connection settings.
interface ISqlDialectMapper The sql dialect mapper
interface ISqlExpressionTranslator An interface custom ISqlDialect types can implement to change generated expressions for dynamic expression like ConcatExpressionAttribute. They should return NULL if it can't handle this expression type
interface ISqlQuery SqlQuery interface.
interface ISqlQueryExtensible Extensible SQL query interface. Used to abstract Serenity.Data.Row dependency from SqlQuery.
interface ISqlQueryToString SqlQuery interface.
interface IUnitOfWork An interface to implement unit of work pattern, e.g. a transaction.
abstract class Join Corresponds to an SQL JOIN (INNER, OUTER, CROSS etc.)
class JoinAliasLocator Locates alias references in an SQL expression
class JsonCriteriaConverter Serialize/deserialize a BaseCriteria object
class JsonSafeCriteriaConverter Serialize/deserialize a BaseCriteria object and checks for safety of criteria expressions.
class LeftJoin LEFT JOIN type
class MySqlDialect MySql dialect.
class NamePropertyAttribute Determines that the attached property is the name field of the table.
struct OldNewPair<TItem> A pair of old new values
class Oracle12cDialect Oracle12cDialect which uses OFFSET FETCH instead of ROWNUM
class OracleDialect Oracle dialect
class OuterApply OUTER APPLY join type
class ParamCriteria A criteria object containing a parameter name
struct Parameter Parameter struct
static class ParamPrefixReplacer Param prefix replacer
class PostgresDialect Postgres dialect
class QueryWithParams Base class for queries with params like SqlQuery, SqlUpdate, SqlInsert
static class QueryWithParamsExtensions Extension methods for classes implementing IDbWhereParam interface.
delegate ReaderCallBack A delegate that gets a data reader parameter
class RightJoin RIGHT JOIN type
class SafeCriteriaValidator Validates a criteria for allowed field names, operators and SQL injection safety
enum SelectLevel Select level enumeration
enum ServerType Contains server type names for common dialects
static class SetFieldByStatementExtensions Extension methods for classes implementing IDbSet interface
static class Sql Contains SQL expression generation helpers
class SqlCommandDumper http://stackoverflow.com/questions/265192/get-the-generated-sql-statement-from-a-sqlcommand-object (answer by Mitch)
static class SqlConversions Value to SQL constant expression conversions
class SqlDebugDumper Formats a debug version of a query, replacing parameters with SQL constants, fixing brackets, database caret references etc.
class SqlDelete Class to generate queries of form DELETE FROM tablename WHERE [conditions].
static class SqlHelper Contains static SQL related helper functions and extensions.
class SqlInsert Class to generate queries of the form INSERT INTO tablename (field1, field2..fieldN) VALUES (value1, value2..valueN)
class SqliteDialect Sqlite dialect.
static class SqlMapper Dapper wrapper
class SqlQuery SQL query string builder
class SqlServer2000Dialect SqlServer 2000 dialect.
class SqlServer2005Dialect Sql Server 2005 dialect.
class SqlServer2008Dialect Sql Server 2008 dialect.
class SqlServer2012Dialect Sql Server 2012 dialect.
static class SqlSettings Global SQL settings
static class SqlSyntax Contains SQL syntax helpers.
enum SqlUnionType Type of SQL UNIONs.
class SqlUpdate Generates queries of the form UPDATE tablename SET field1 = value1, field2 = value2 ... fieldN = valueN WHERE [filter].
static class T0ReferenceRemover Removes T0. references in SQL expression
class TransactionlessUnitOfWork Unit of work implementation without an underlying actual transaction. Use with care only to pass a IUnitOfWork instance to some methods that you don't want to actually start a transaction.
class TransactionSettings Determines the transaction isolation level and defer start flag used for service endpoint action use when creating the UnitOfWork class
class TransactionSettingsAttribute Determines the transaction isolation level and defer start flag used for a service endpoint action use when creating the UnitOfWork class
class TwoLevelCachedAttribute This attribute marks a row so that when it is Inserted/Updated/Deleted through handler, its related cache, if any should be cleared. It doesn't turn on/off caching. A sample of related cached item to a row, might be its lookup if any.
class UnaryCriteria Unary criteria with one operand and operator
class UnitOfWork Unit of work implementation.
class ValueCriteria Criteria object with one value
class WrappedConnection Wraps a connection to add current transaction and dialect support.
class WrappedTransaction Wraps a transaction instance to add current transaction support for the wrapped connection.

Serenity.Data.Mapping namespace

signature name description
class AutoIncrementAttribute Marks the field as auto increment, e.g. generated on insert in SQL side
abstract class BaseExpressionAttribute Specifies SQL expression this property corresponds to. You may use brackets ([]) to escape identifiers. Brackets will be converted to database specific quotes.
class CaseAttribute Concat expression attribute
class CaseSwitchAttribute Case expression with simple switch value
class ColumnAttribute Explicitly specifies the database column name for property. Use this attribute if matching column name in database is different than the property name.
class ConcatAttribute Concat expression attribute
class DateDiffAttribute DateDiff expression attribute
class DatePartAttribute DatePart expression attribute
class ExpressionAttribute Specifies SQL expression this property corresponds to. You may use brackets ([]) to escape identifiers. Brackets will be converted to database specific quotes.
class ForeignKeyAttribute Specifies that this property is a foreign key to another field in a primary key table. There is no need for foreign key to exist in database actually. It is not checked. This is mostly used for joins.
class IdentityAttribute Marks the field as Identity, a combination of PrimaryKey, AutoIncrement and NotNull flags.
class InnerJoinAttribute INNER JOIN type
interface ISqlJoin Interface for SQL join types
class LeftJoinAttribute LEFT JOIN type
class LinkingSetRelationAttribute Specifies a linking set relation (1-N relation of ID values, like a check list.)
class LookupIncludeAttribute Marks the property so that it should be included in lookup by default.
class MasterDetailRelationAttribute Defines a master detail relation (1-N) between this row and another
class MinSelectLevelAttribute Determines minimum selection level for this field.
class NotMappedAttribute Specifies that this property is not mapped to an SQL column/expression
class NotNullAttribute Specifies that field can not be null.
class OriginAttribute Specifies that this column belongs to another table.
class OuterApplyAttribute Adds a OUTER APPLY to the row
class PrimaryKeyAttribute Marks the property as part of the primary key.
class QuickSearchAttribute Marks the property so that it should be included in quick text searches.
class ScaleAttribute Determines numeric scale (decimal places) for the field.
enum SearchType Quick search type enumeration
class SetFieldFlagsAttribute Used to turn on (include) or turn off (exclude) field flags.
class SizeAttribute Determines size (max length or numeric precision for) for the field.
class SqlDateTimeOffsetAttribute Dialect specific SQL expression for current date/time with timezone
class SqlNowAttribute Dialect specific SQL expression for current date/time in server's timezone
class SqlUtcNowAttribute Dialect specific SQL expression for UTC date/time
class TableNameAttribute Determines table name for the row.
class TextualFieldAttribute Determines textual field for this field. This is placed on foreign keys and specifies which field in joined table (view fields in this row that originates from foreign table) should be used for display / filtering.
class UniqueAttribute Defines a unique constraint on the field
class UniqueConstraintAttribute Adds a unique constraint check to the row.
class UpdatableExtensionAttribute Marks the JOIN as an updatable extension.

Serenity.Data.Schema namespace

signature name description
class FieldInfo Meta data information for an SQL column
class FirebirdSchemaProvider Firebird metadata provider.
class ForeignKeyInfo SQL metadata for a foreign key
interface ISchemaProvider Abstraction for SQL metadata providers
class MySqlSchemaProvider MySql metadata provider
class OracleSchemaProvider Oracle metadata provider.
class PostgresSchemaProvider PostgreSQL metadata provider
class SqliteSchemaProvider SQLite metadata provider
class SqlServerSchemaProvider SQL server metadata provider
class TableName Table schema/name and view information

Serenity.Extensions.DependencyInjection namespace

signature name description
static class DataServiceCollectionExtensions Contains extensions to register data services