"Form Controls" and "Entity Class"

Perhaps this is an ad, but had to write about here, between the form and the entity class we often do a bunch of things and value assignment, the need to constantly type conversion, or to write SQL statements and the entity class assignment, and testing and so on. This simple add and delete, modify it for that is a waste of manpower, but also a waste of time! But now, I realize the automatic assignment KeelKit!

The following code demonstrates:

        Keel.DBHelper<Table_1> dbt = new Keel.DBHelper<FirstWebDemo.Mode.Table_1>();
        Table_1 t = dbt.Distill(this.ctl_Table_1_Keel1);
        dbt.Fill(this.ctl_Table_1_Keel2, t);

As can be seen from the above example, after creating a DBHelper, extracted from the form Model only need to use a method Distill, we assigned to the second form, only we need a function Fill, to complete the form filling. If you need to add and update at this time, it is easy. An insert or update function, can simply add and update data.

Whether it WindowsApplaction or WebSite or WebApplaction, this is no doubt, are supported.

For the WebSite, as long as you follow the naming convention,
for example, control name text field keelctl_txt beginning, the beginning of the field keelctl_dec data type, followed by the field name! Extraction and assignment functions can easily find these fields, because for ID or Name property, is the most easy to find.

Later I intend to implement some custom programs! According to the specified program, to support third-party controls or custom controls!

Perhaps a coincidence, after I submit these source soon, the garden actually appeared similar article! Looks like some of the same methods. Very surprised.

Finally an old topic, whether it is C # VB.Net F # or IronPython if you can add in the project in the solution, this open source tool can generate entity classes and stored procedures you access interface (before generating the required configuration Called for each stored procedure)!

Reproduced in: https: //my.oschina.net/mysticboy/blog/541369

Guess you like

Origin blog.csdn.net/weixin_33884611/article/details/92064622