Skip to content
Jacob Spitzer edited this page Aug 28, 2022 · 2 revisions

Method reference index

Method Description
All<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Determines whether all records of a DbEc recordset satisfy a condition.
All<Table>(DbEcExtended<Table>, Expression<Func<Table,bool>>) Determines whether all records of a DbEc recordset satisfy a condition.
Any<Table>(DbEc<Table>) Determines whether a DbEc recordset contains any records.
Any<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Determines whether any record of a DbEc recordset satisfy a condition.
Any<Table>(DbEcExtended<Table>) Determines whether a DbEc recordset contains any records.
Any<Table>(DbEcExtended<Table>, Expression<Func<Table,bool>>) Determines whether any record of a DbEc recordset satisfy a condition.
AsEnumerable() Executes a query, returning an IEnumerable object with the data typed as T.
Bottom<Table>(DbEc<Table>, int) Returns a specified number of contiguous records from the end of a DbEc recordset.
CreateAllTables(DbEcDatabase) Creates all Tables on the server database, based on the code classes with [Table] attribute. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateAllTables(DbEcDatabaseExtended) Creates all Tables on the server database, based on the code classes with [Table] attribute. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateAllTablesIfNotExists(DbEcDatabase) Checks each table if exists on the database, and creates the non-exists Tables on the server database, based on the code classes with [Table] attribute. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateAllTablesIfNotExists(DbEcDatabaseExtended) Checks each table if exists on the database, and creates the non-exists Tables on the server database, based on the code classes with [Table] attribute. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateTable<Table>(DbEc<Table>) Creates a Table on the server database, based on the code table properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateTable<Table>(DbEcExtended<Table>) Creates a Table on the server database, based on the code table properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateTableIfNotExists<Table>(DbEc<Table>) Creates a Table on the server database if not exists, based on the code table properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
CreateTableIfNotExists<Table>(DbEcExtended<Table>) Creates a Table on the server database if not exists, based on the code table properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
Delete<Table>(DbEc<Table>) Deletes all records of the DbEc recordset on the database table.
Delete<Table>(DbEc<Table>, Table, string) Deletes an entity from table.
Delete<Table>(DbEcExtended<Table>) Deletes all records of the DbEc recordset on the database table.
DeleteList<Table>(DbEc<Table>, List<Table>, string) Deletes a list of entities from table.
DropAllTables(DbEcDatabase) Removes all Tables on the server database, based on the code classes with [Table] attribute.
DropAllTables(DbEcDatabaseExtended) Removes all Tables on the server database, based on the code classes with [Table] attribute.
DropTable<Table>(DbEc<Table>) Removes a Table from the server database.
DropTable<Table>(DbEcExtended<Table>) Removes a Table from the server database.
DropTableIfExists<Table>(DbEc<Table>) Removes a Table from the server database if exists.
DropTableIfExists<Table>(DbEcExtended<Table>) Removes a Table from the server database if exists.
Execute() Execute DbEc SQL boolean command and returns true or false.
Execute() Execute DbEc SQL command.
Execute() Execute DbEc SQL command.
Execute() Execute DbEc SQL command.
ExecuteAsync() Execute DbEc SQL boolean command asynchronously using Task, and returns true or false.
ExecuteAsync() Execute DbEc SQL command asynchronously using Task.
ExecuteAsync() Execute DbEc SQL command asynchronously using Task.
ExecuteAsync() Execute DbEc SQL command asynchronously using Task.
Find<Table>(DbEc<Table>, long, string) Returns a single entity by a single id from table. Id must be marked with [Key] attribute.
Find<Table>(DbEc<Table>, long[], string) Returns a list of entities from table by a list of given ids. Id must be marked with [Key] attribute.
First<Table>(DbEc<Table>) Executes a single-row query, returning the first record of the DbEc recordset.
First<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Executes a single-row query, returning the first record of the DbEc recordset that satisfies a specified condition.
First<Table>(DbEcExtended<Table>) Executes a single-row query, returning the first record of the DbEc recordset.
First<Table>(DbEcExtended<Table>, Expression<Func<Table,bool>>) Executes a single-row query, returning the first record of the DbEc recordset that satisfies a specified condition.
FirstOrDefault<Table>(DbEc<Table>) Executes a single-row query, returning the first record of the DbEc recordset, or NULL if no record is found.
FirstOrDefault<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Executes a single-row query, returning the first record of the DbEc recordset that satisfies a specified condition, or NULL if no such record is found.
FirstOrDefault<Table>(DbEcExtended<Table>) Executes a single-row query, returning the first record of the DbEc recordset, or NULL if no record is found.
FirstOrDefault<Table>(DbEcExtended<Table>, Expression<Func<Table,bool>>) Executes a single-row query, returning the first record of the DbEc recordset that satisfies a specified condition, or NULL if no such record is found.
GetAll<Table>(DbEc<Table>) Returns a list of all entities from table.
GetAllServerDbTablesType(DbEcDatabase) Returns a list of all table defenitions from the server database.
GetDiffServerDbToCodeDb(DbEcDatabase) Compares the server database and the code classes with [Table] attribute, checks each table and their fields and properties.
GetDiffServerTableToCodeTable<Table>(DbEc<Table>) Compares the server table and the code class with that table name, checks each field and their properties.
Insert<Table>(DbEc<Table>, Table) Inserts an entity into table.
InsertAndReturnId<Table>(DbEc<Table>, Table) Inserts an entity into table and returns identity id.
InsertList<Table>(DbEc<Table>, List<Table>) Inserts a list of entities into table.
InsertListAndReturnIds<Table>(DbEc<Table>, List<Table>, string) Inserts a list of entities into table and returns a list of identity ids.
IsEqualServerDbToCodeDb(DbEcDatabase) Compares the server database and the code classes with [Table] attribute, checks each table and their fields and properties.
Join<TOuter,TInner,TKey,TResult>(DbEc<TOuter>, DbEc<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>, JoinType) Correlates the records of two DbEc recordsets based on matching keys.
ModifySqlString<Table>(DbEcExtended<Table>, string) Modifies manually the DbEc SQL command with any given string.
ModifyTable<Table>(DbEc<Table>) Modifies a table definition on the server database by altering, adding, or dropping columns and column datatypes, based on the code table properties. Available modifications: Add field, Remove field, Change field datatype.
ModifyTable<Table>(DbEcExtended<Table>) Modifies a table definition on the server database by altering, adding, or dropping columns and column datatypes, based on the code table properties. Available modifications: Add field, Remove field, Change field datatype.
OrderBy<Table,TKey>(DbEc<Table>, Expression<Func<Table,TKey>>) Sorts the records of a DbEc recordset in ascending order according to a key.
OrderByDescending<Table,TKey>(DbEc<Table>, Func<Table,TKey>) Sorts the records of a DbEc recordset in descending order according to a key.
OverrideTable<Table>(DbEc<Table>) Overrides a Table on the server database, based on the code table properties. Caution! This action will DELETE the current table on the Server with all the records, and then create a new blank Table with the current code properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
OverrideTable<Table>(DbEcExtended<Table>) Overrides a Table on the server database, based on the code table properties. Caution! This action will DELETE the current table on the Server with all the records, and then create a new blank Table with the current code properties. Supported attributes are: [Key] for Primary Key, [AutoIncrement] for Auto Increment property, [Required] for Not Null property.
ReplaceInSqlString<Table>(DbEcExtended<Table>, string, string) Replaces parts of the DbEc SQL command.
Use this method to replace any part of the SQL string according to the Database language.
Select<Table,TResult>(DbEc<Table>, Expression<Func<Table,TResult>>) Projects the DbEc recordset into a new form of a result table by selecting specific columns or calculations to retrieve from the table.
Select<Table,TResult>(DbEcOrder<Table>, Expression<Func<Table,TResult>>) Projects the DbEc recordset into a new form of a result table by selecting specific columns or calculations to retrieve from the table.
Single<Table>(DbEc<Table>) Returning the only record of the DbEc recordset, and throws an exception if there is not exactly one record.
Single<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Returning the only record of the DbEc recordset that satisfies a specified condition, and throws an exception if there is not exactly one record that satisfies the predicate function.
Single<Table>(DbEcExtended<Table>) Returning the only record of the DbEc recordset, and throws an exception if there is not exactly one record.
Single<Table>(DbEcExtended<Table>, Expression<Func<Table,bool>>) Returning the only record of the DbEc recordset that satisfies a specified condition, and throws an exception if there is not exactly one record that satisfies the predicate function.
SingleOrDefault<Table>(DbEc<Table>) Returning the only record of the DbEc recordset, or NULL if no such record is found, and throws an exception if there is not exactly one record.
SingleOrDefault<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Returning the only record of the DbEc recordset that satisfies a specified condition, or NULL if no such record is found, and throws an exception if there is not exactly one record that satisfies the predicate function.
SingleOrDefault<Table>(DbEcExtended<Table>) Returning the only record of the DbEc recordset, or NULL if no such record is found, and throws an exception if there is not exactly one record.
SingleOrDefault<Table>(DbEcExtended<Table>, Expression<Func<Table,bool>>) Returning the only record of the DbEc recordset that satisfies a specified condition, or NULL if no such record is found, and throws an exception if there is not exactly one record that satisfies the predicate function.
Skip<Table>(DbEc<Table>, int) Bypasses a specified number of records in a DbEc recordset and then returns the remaining records.
Take<Table>(DbEc<Table>, int) Returns a specified number of contiguous records from the start of a DbEc recordset.
ThenBy<Table,TKey>(DbEcOrder<Table>, Expression<Func<Table,TKey>>) Performs a subsequent ordering of a DbEc recordset in ascending order according to a key.
ThenByDescending<Table,TKey>(DbEcOrder<Table>, Expression<Func<Table,TKey>>) Performs a subsequent ordering of a DbEc recordset in descending order according to a key.
ToList() Executes a query, returning an List object with the data typed as T.
ToListAsync() Execute a query asynchronously using Task, returning an List object with the data typed as T.
Top<Table>(DbEc<Table>, int) Returns a specified number of contiguous records from the start of a DbEc recordset.
ToSqlString() Returns the DbEc generated Sql command.
To modify the Sql command manually, use the DbEcExtended method, and then use the ModifySqlString or ReplaceInSqlString method.
ToSqlString() Returns the DbEc generated Sql command.
To modify the Sql command manually, use the DbEcExtended method, and then use the ModifySqlString<Table>(DbEcExtended<Table>, string) method.
DbEc<Table>(SqlConnection, SqlDialect) Initializes a new instance of the DbEc<T> class when taken a class type that contains the [Table] attribute.
DbEcDb<Table>(SqlConnection, SqlDialect) Initializes a new instance of the DbEcDatabase class.
DbEcDbExtended<Table>(SqlConnection, SqlDialect) Initializes a new instance of the DbEcDatabase class.
DbEcExtended<Table>(SqlConnection, SqlDialect) Initializes a new instance of the DbEcExtended<T> class when taken a class type that contains the [Table] attribute.
Update<Table>(DbEc<Table>, Expression<Func<Table,Table>>) Updates one or more columns on all records of the DbEc recordset to the database table by the predicate assignment(s).
Update<Table>(DbEc<Table>, Table, string) Updates an entity in table.
Update<Table>(DbEcExtended<Table>, Expression<Func<Table,Table>>) Updates one or more columns on all records of the DbEc recordset to the database table by the predicate assignment(s).
UpdateList<Table>(DbEc<Table>, List<Table>, string) Updates a list of entities in table.
Where<Table>(DbEc<Table>, Expression<Func<Table,bool>>) Filters a DbEc recordset based on a predicate.

Clone this wiki locally