All Article indexes: CYQ. Data lightweight Data layer path framework open-source series Indexes
Preface:
It has been 20 days since V1.5 was released. Version 2.0 has finally been released. Due to the introduction of multi-database support, the internal structure of the 2.0 series has been greatly changed.
However, the calling method remains consistent and backward compatible. Therefore, if you upgrade from V1.N to 2.n, you only need to replace CYQ. Data. DLL with ease, and the interface code does not need to be changed.
Question?
V1.5.5 was just released on the 26th. How did I release version 2.0 three days later? That's a big change in time. Isn't it unstable?
Q:
In V1.5.5, the source code of V1.5 is directly modified, but some application bugs in sql2000 are basically fixed in the original version.
When V1.5.5 was released, V2.0 has been released for a long time, but it has always been a preemptive version.
Version Upgrade content:
1: Access/Oracle databases are supported. Currently, SQL 2000/SQL 2005/access/oracle is supported.
2: built-in Aop, which can separate permissions, operation logs, exceptions, or other SQL Execution statistics modules for independent development.
3: added two affiliated methods for MDataTable: Bind (Control name) and ToJson ();4: MAction just added the debugging information output attribute: DebugInfo
I. Current configuration file configuration options
1: default database link[Required]:
<Add name = "Conn" connectionString = "database link string" providerName = "it is best to write it down. If you do not write it, take the keyword from the link string as the branch"/>
ProviderName options:
SQL 2000/SQL 2005: System. Data. SqlClient
Access: System. Data. OleDb
Oracle: System. Data. OracleClient
2: Enable abnormal log table Configuration[Optional]:
Deleetasknode: <add key = "IsWriteLog" value = "true"/>
Note: If this node is not configured, an exception is thrown by default in V1.5 or later versions. If it is set to true, exceptions are not thrown.
ConnectionStrings node: <add name = "LogConn" connectionString = "Conn"/>
Note: If the log table and Conn are the same database by default, you can share the link.
3: Enable Aop function configuration[Optional]:
AppSettings node: <add key = "Aop" value = "CYQ. Data. Test, CYQ. Data. Test. MyAop"/>
Note: CYQ. Data. Test Is the Assembly name, And CYQ. Data. Test. MyAop is the class name with the complete namespace.
4: configure the Oracle Auto-incrementing sequence name[Optional]:
AppSettings node: <add key = "AutoID" value = "MyAutoID"/>
Description: The default sequence name is AutoID.
Ii. using syntax
Some netizens have a special liking for using syntax. Here I will explain the usage:
1: using syntax:
Using (MAction action = new MAction ("table") {business processing} is equivalent to => try {business processing} finally {if (action! = Null) {action. Disponse ();}}
2: using syntax notes:
First, we need to know that for the using syntax, the Disponse () method is executed at the end of the business processing.
Therefore, if your business processing time is long, and these long processing logic may have nothing to do with the database, for example, to identify the data, and then make a lot of business logic processing based on the detected data.
In this case, when using and where the braces are ended, you should pay attention to it. Although it does not affect the overall situation, abuse is not good after all.
3: demo of using in Bind syntax of the new MDataTable Method:
Using (MAction action = new MAction (TableNames. Users ))
{
Action. Select (). Bind (rptList );
}
Notes:
1: When the Select method cannot query data, null is not returned, but an instance of new MDataTable () is returned.
2: Since the Select statement does not return null, you can use its Bind method to directly Bind the rptList control.
3: The Bind method supports the following controls: GridView/Repeater/DataList/DataGrid/DataGridView
Iii. Enumeration generator V2.0 released
In the previous one, support for Access/Oracle generation enumeration is added.
As follows:
Iv. Framework and recent Auxiliary Tools
For details, see CYQ. Data lightweight Data layer bug feedback, optimization suggestions, and download of the latest framework.
Statement:
Using this framework for development is simple to get started, with high development efficiency, superior performance, and more detailed API documentation, there are related help articles, sample articles, and related video tutorials and auxiliary tools.
The key is free and open-source. It is a must-have product for home travel, project development, and study !!!!!!
Postscript:
Don't hesitate. From the moment you see this framework, join the army of users. From the very beginning to learning, it will only take 5 minutes to dictate the course. It will take 10 minutes to watch video tutorials, read the article for at most half an hour.
Fast Learning and quick use:
If you are a student: using it to develop works not only improves your personal experience, but also helps you find a job in the future.
If you are an enterprise: use it to develop company projects, that is, to improve employee development efficiency and better unify the development style. Even if employees flow, new people come in and dictate for a few minutes, you can quickly take over and understand the overall architecture.
If you are a beginner developer: The boss is pressing the whole day, forcing you to quickly develop and deliver products, and writing the framework and capability limits on your own, other frameworks on the Internet are large, many, difficult to learn, and difficult to use. How can this problem be solved? With this framework, I am not bothered to use it any more.
If you are an intermediate developer: You are in the upgrading stage. Try to develop your own framework and download the source code study. It is not a bad idea to add more ideas. You can also go to the Group for discussion and promote each other.
If you ......
Finally, I wish you peace of mind, peace of mind, and happiness. Your encouragement is my greatest motivation.