Knight Data Access Layer
DataHelper Class Members
Properties  Methods 


KellermanSoftware.NetDataAccessLayer Namespace : DataHelper Class

The following tables list the members exposed by DataHelper.

Public Constructors
 NameDescription
Public ConstructorOverloaded.   
Top
Public Properties
 NameDescription
Public Property Set to intercept an object after a record is deleted  
Public Property Set to intercept an object after a record is inserted  
Public Property Set to intercept an object after it is read  
Public Property Set to intercept an object after a record is updated  
Public Property Set to intercept an object before a record is deleted  
Public Property Set to intercept an object before a record is inserted  
Public Property Set to intercept an object before a record is updated  
Public PropertyGet a reference to the current connection  
Public PropertyGet or set the Connection String of the Database Provider  
Public Property Used for viewing the internal level of nested transactions. Each Begin Transaction adds 1. Each Commit Transaction subtracts 1.  
Public PropertyIf true, properties such as CreateDate, UpdateDate, CreateUser will be automatically filled in before saving The default is true  
Public PropertyTrue if the connection is open  
Public Property Gets a value indicating whether the provider is file based database.  
Public PropertyReturns true if we are in a transaction  
Public Propertystatic (Shared in Visual Basic) Returns true if the session has been created for the current thread  
Public Property The license key associated with a license. See the License Key on your receipt.  
Public PropertyA list of the names maintenance fields that will be filled in automatically such as CreateDate, UpdateDate, CreateUser  
Public PropertyMap objects, table names, and sql to database tables  
Public Property When true, Inner Begin Transactions and Commit Transactions are allowed. Inner Commits do not actually commit until the outermost commit has occured. Default is false. Nested transactions are useful for rolling back integration tests.  
Public PropertyGet or Set the Prefix used for Parameters  
Public Property Get the database provider that was set in the constructor  
Public Property Get the type of the provider  
Public PropertyIf true, defaults will be set in the object before it is sent to the database. The default is false  
Public PropertyReturns true if the attached database provider supports identity columns  
Public PropertyReturns true if the attached database provider supports stored procedures  
Public PropertyGet a reference to the current transaction  
Public Property The user name associated with a license. See the User Name on your receipt.  
Top
Public Methods
 NameDescription
Public Method Adds the column to the passed in table  
Public Method Adds the maintenance fields to the passed in table if they do not exist  
Public MethodOverloaded.  Returns true if any records exist in a table  
Public MethodBegin a new transaction  
Public Method Change database  
Public MethodOverloaded. Clear the file log  
Public MethodClose the database connection  
Public MethodCommit the current transaction  
Public MethodOpens and closes the connection to ensure it is valid  
Public Method Return the count of records in the table  
Public Method Get the number of records in a table  
Public Method Create classes for the current database in the passed in namespace  
Public Method Create a C# class from a table  
Public MethodOverloaded.  Create new database  
Public Method Create an index for the passed in table  
Public Method Create a LINQ query using an enhanced version of the IQToolkit  
Public Method Create a table in the database based on the passed class  
Public MethodOverloaded.  Create a table in the database for each class that is in the passed in namespace  
Public Method Create a VB.NET class from a table  
Public MethodOverloaded.  Check database existance  
Public MethodOverloaded. Delete a record where all parameters are equal  
Public Method Delete an object by the primary key  
Public MethodOverloaded.  Delete an object by the primary key and all its children  
Public MethodDisable all logging  
Public MethodClose the connection on dispose  
Public Method Drop (remove) a table's sequence from database  
Public MethodOverloaded.  Drop a table associated with a class  
Public Method Drop (remove) a sequence's trigger from database  
Public MethodOverloaded. Log to the console  
Public MethodOverloaded. Execute the passed query and return the number of affected records  
Public MethodOverloaded. Execute the passed stored procedure and return the number of affected records  
Public MethodOverloaded. Execute the passed query and return the first column of the first row  
Public MethodOverloaded. Execute the passed stored procedure and return the first column of the first row  
Public Methodstatic (Shared in Visual Basic) Extend the trial of the software  
Public MethodOverloaded. Fill the passed data table with the passed query  
Public Method Returns true if the Foreign Key Exists  
Public MethodOverloaded.  Create the SQL needed to create all the tables for the namespace  
Public Method Generate the SQL for creating the list of tables  
Public MethodOverloaded.  Create the SQL needed to upgrade all the tables for the namespace  
Public MethodOverloaded.  Generate SQL to upgrade a single table  
Public Method Get all Foreign Key constraints for the current database  
Public MethodGet a list of the databases or schemas on the database server. For providers that do not support multiple databases or schemas, the list will be empty.  
Public MethodGet the date of the database server. For providers that do not have a database date, DateTime.Now is returned.  
Public MethodGet a list of tables in the current database with the associated indexes and foreign keys, sorted alphabetically  
Public MethodGet a list of tables in the current database WITHOUT the associated indexes or foreign keys, sorted alphabetically  
Public Method Get the database field type for the passed standard DbType. Used internally for creating tables. Can be also used externally for code generation.  
Public MethodOverloaded.  Get a datatable from the passed query  
Public Method Get the DbType for provided ClrType. Used internally for creating tables. Can be also used externally for code generation.  
Public MethodGet the last identity that was inserted  
Public MethodGet the SQL used to get the identity for the last inserted record  
Public Method Gets the indexes for a table.  
Public Method Load a child or a parent by the property name lambda  
Public MethodOverloaded. Get the maximum value for a primary key.  
Public Method Get the object map for the passed class. Useful for code generation or getting schema information.  
Public Method Detect if an index exists  
Public MethodOverloaded. Insert a record into the table  
Public MethodOverloaded. Select records using the passed SQL and return a list of dictionary records.  
Public MethodOverloaded. Load all the records from a table into a class list  
Public MethodOverloaded.  Load all the records from a table and its children and parents into a class list  
Public MethodLoad records based on a column into a class list  
Public Method Same as LoadByColumn except loads the associated children  
Public MethodLoad a single record using the primary key  
Public MethodOverloaded. Get a list of records using the passed Stored Procedure  
Public MethodOverloaded.  Load a list of objects from a stored procedure with all children  
Public MethodOverloaded. Return a list of items with the primary key and the first string column ordered by the first string column  
Public MethodOverloaded. Get a single record for a table and a parameterized where clause and return a dictionary.  
Public MethodOverloaded.  Get a page of records for a table  
Public MethodOverloaded.  Load a page of records with children that are filtered by a where clause and ordered  
Public MethodOverloaded.  Get a limited number of records for a table  
Public MethodOverloaded.  Load entities matching the passed in where clause  
Public MethodOverloaded.  Load all the records from a table and its children and parents into a class list  
Public MethodOpen the database connection  
Public MethodOverloaded. Returns true if the record exists  
Public MethodPerform a rollback of the current transaction  
Public MethodOverloaded. Inserts, Updates or Deletes a record in the table. If the primary key is zero or null, it is an insert otherwise an update. If IsDeleted is set, the record is deleted.  
Public MethodOverloaded.  Save an object with its parent and children  
Public MethodOverloaded. Search for records based on the passed in search object. If the value is null or the default value, then the item will not be part of the where clause.  
Public Method Count the number of records for a search  
Public Methodstatic (Shared in Visual Basic) Get a thread static safe Data Helper Session. The session is automatically created on the first access. The same session is retrieved per thread after the first call.  
Public Method Set the foreign primaryKey of the child object to the primaryKey of the parent object. This is done automatically for SaveWithChildren  
Public MethodOverloaded.  Create the database if it does not exist. Create tables that do not exist. Create columns that do not exist.  
Public MethodReturns true if the passed stored procedure exists in the database  
Public MethodOverloaded.  Synchronize table structure for each class that is in the passed in namespace  
Public Method Synchronize table structure with the specified by typeparam class  
Public Method Create/Update a table and fill with values from an enum.  
Public MethodOverloaded. Returns true if the passed table exists in the database  
Public MethodOverloaded.  Delete all the records from a table  
Public MethodOverloaded.  Update a record in the database by a composite primaryKey  
Top
See Also

Reference

DataHelper Class
KellermanSoftware.NetDataAccessLayer Namespace