YbSoftwareFactory code generation plug-in for secondary development [4]: Trial of new functions of YbSoftwareFactory 2.1

Source: Internet
Author: User

The new version of YbSoftwareFactory (V2.1) adds multiple personalized features

It is worth noting that multi-database support and export and import of table and column editing content are added.

I. Multi-Database Support

The multi-database code generation function currently supports multiple standard database connection methods, including SQL Server connections (2005, 2008, etc.), Orcale connections, Access connections, and ODBC connections, more database connections such as DB2, MySQL, PostgreSQL, SqlCE, SQLite, Sybase, and VistaDB will be supported in the future.

You can declare the supported cename on the PlugInGroupAttribute of the ingroup implementation class of the plug-in implementation code. The Code is as follows:

Namespace Yb. PlugIn. CastleDevExpress. WebForm {
[PlugInGroupAttribute (
Name = "Castle DxV2 for WebForm ",
Description = "generate the Castle data access layer, DxV2 Interface Layer Code and solution ",
DisplayOrder = 3, DataSourceType = DataSourceType. Database,
CENAME = CENAME. SqlDataSource | CENAME. AccessDataSource,
ImageUri = "pack: // application:,/Yb. PlugIn. CastleDevExpress. WebForm; component/Images/WebFormSolution.png ",
LargeImageUri = "pack: // application:,/Yb. PlugIn. CastleDevExpress. WebForm; component/Images/WebFormSolution.png ",
NavigationGroup = "Castle DxV2 code generation plug-in")]

DataSourceName is an Enum type with FlagAttribute. The declaration is as follows:

[FlagsAttribute]
Public enum extends CENAME: short
{
EmptyDataSource = 0,
SqlDataSource = 1,
OdbcDataSource = 2,
AccessDataSource = 4,
OracleDataSource = 8,
SqlFileDataSource = 16
};

Then you can select the database type in YbSoftwareFactory. The interface for selecting an Access database is as follows:

Access database connection support:

Ii. Export and Import of table and column editing content

Generally, the Chinese name of the corresponding object and field needs to be displayed on the interface, and the "display name" field is the name to be displayed on the interface. You can directly edit this field, you can then export the edited content. The next time you reload the content, you can import the edited content at one time. The reusability greatly reduces the workload of editing later.

You can click the Export and Import buttons to save and load edited fields.

Before importing table metadata:

The field content edited after import has become Chinese:

Appendix:

Download the "Yb. Plugin. CastleDevExpress. WebForm" plug-in source code

Download the Demo database of the "Yb. PlugIn. CastleDevExpress. WebForm" code generation plug-in

YbSoftwareFactory 2.1 master application download

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.