A long time ago, we had plans to make such a component (some of them refer to nhib.pdf.
Some may ask why do I have to write one myself? You can learn a lot during the writing process!
Of course, the components are not as powerful as nhib.pdf, Code The volume is far less than that of nhib.pdf with only several thousand rows );
Since work relationships are a relatively lazy person, it is only now possible to complete the functions.
It was originally intended to make the components open-source after further improvement, but unfortunately the work and inertia reasons :) I don't know when to complete it.
Make the component public here. If you are interested, modify and improve the component (NOTE: See the protocol file before use ).
Hfsoft. Data is designed to help developers quickly and easily perform data operations, thus improving development efficiency.
-- The current version supports the following features:
1. Multi-Database Support
SQL Server, access, and Oracle Database provider are currently provided.
You can use idriver to implement a new database provider.
2. Supports object ing
Object Addition
Object Modification
Object Query
3. Object relationship retrieval is supported.
Obtain the unlimited sub-object level. Currently, only the ilist interface is supported.
The parent object can be obtained at the first layer. Corresponding object types are supported.
Link object update is currently not supported.
4. Support for Object Query Conditions
The provided query objects include: =, <>,>, >=, <, <=, like, in, notin, between, not
5. Support for direct SQL parametric Query
6. Support direct Command Execution
7. Support for obtaining ilist and dataset Datasets
8. transaction support
-- Complete functions of subsequent versions
Operation log tracking can be recorded to implement the log operation class according to your own situation.
Link object acquisition is improved. You can specify to obtain the corresponding link objects, including (not getting, getting all, getting the parent, getting the child, and getting the specified type );
The link object update operation also allows you to update a specified type.
Command object Cache
Entity object cache (still trying to sync)
Record set Cache
-- Description of the calling function
-Idatareader executereader (idbcommand cmd );
Execute the command object and return a data read object
-Object executescalar (idbcommand cmd );
Execute the command object and return an object Value
-Int executenonquery (idbcommand cmd );
Execute the command object and return the number of affected records
-Dataset executedataset (idbcommand cmd );
Execute the command object and return a DataSet object
-Void excutecmds (Params idbcommand [] cmd );
Batch execution command object
-Void open ();
Open Database Connection
-Void close ();
Close database connection
-Void begintran ();
Open Database transactions
-Void commit ();
Commit transactions
-Void roolback ();
Roll back a transaction
-Void Delete (Object entity );
Deletes a specified object.
-Void save (Object entity );
Add specified object
-Void Update (Object entity );
Update a specified object
-Object load (type, Object ID );
Returns the object of the specified index type.
-Ilist list (type, iexpression expression );
Obtain the corresponding type of object set based on the condition object
-Ilist list (type, string query, object [] values );
Obtain the corresponding object set based on parameterized SQL query conditions.
-Void deleteobjects (type, iexpression expression );
Delete corresponding types of object sets based on condition objects
-Void deleteobjects (type, string query, object [] values );
Deletes an object set of the corresponding type based on parameterized SQL query conditions.
-Dataset listds (type, iexpression expression );
Obtain a dataset of the corresponding type based on the condition object.
-Dataset listds (type, string query, object [] values );
Obtain a dataset of the corresponding type based on parameterized SQL query conditions.
-Void updateobjects (type, fieldcollection fields, iexpression expression );
Update the field information of the specified type based on the condition object
-Void updateobjects (type, fieldcollection fields, string query, object [] values );
Updates the field information of a specified type based on parameterized SQL query conditions.
-IQUERY createquery ();
Obtain a query object
Download the application example and source code
If you are interested in communicating with friends can mail henryfan@msn.com or henryfan28@gmail.com